Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Settings: appops: Privacy Guard for P (2/2)
This had been partially split into CMParts, now LineageParts. The AppOps functionality still lives here. Squash of the following changes, adapted to the Lineage SDK: Author: Steve Kondik <[email protected]> Date: Tue Feb 25 14:02:16 2014 +0100 settings: Relocate Privacy Guard icons to framework * So we can use them in the permission dialog for MODE_ASK Change-Id: Ia9bac7dff0bbe91ae48db5d4b0d8f46feb9fdf86 Author: DvTonder <[email protected]> Date: Thu Jan 16 19:01:23 2014 -0500 Settings: Fix up top level "Privacy" section Change-Id: Id4dbda10a891c793bc6eb3c42807cc0e3f6092cc Author: Danny Baumann <[email protected]> Date: Fri Nov 8 13:37:07 2013 +0100 Add back privacy guard manager. Change-Id: Ic9fbbae137bb8425fe72a6cdb2f17117351b5709 Author: Chirayu Desai <[email protected]> Date: Sat Dec 28 18:51:46 2013 +0530 PrivacyGuard: Specify a default value in Settings.getInt method call * While privacy guard is enabled by default, the default value specified here is returned only when the setting is not defined or not an integer. Change-Id: Iaedffcc76a23a310aa7915f6a42ccce83ba5d2a6 Author: Matt Mower <[email protected]> Date: Wed Feb 5 19:40:37 2014 -0600 PrivacyGuard: confirm permissions reset The button to reset all application permissions to enabled looks suspiciously like a refresh button. Prompt the user with a confirmation dialog to make sure they know what they've pressed. Change-Id: I0444c5bf8e9533feccf890055d34d3200609c6f6 Author: Diogo Ferreira <[email protected]> Date: Wed Dec 17 11:56:22 2014 +0000 su: Add Root access app-ops control Adds an app-ops option for root access. Platform-signed apps weren't previously being listed but there are some that use root access (FileManager comes to mind). So we list all of them, but for platform-signed apps we only show the root toggle and none of the permission-based ones. Change-Id: Ie716974156d55eb66061e78dc39505569e5bdc2a Author: Shashank Mittal <[email protected]> Date: Thu Sep 5 19:01:47 2013 -0700 AppOps: Add more operations in app ops settings. Add following operations in app ops settings. -- Wifi enable/disable -- Bluetooth enable/disable Change-Id: I32183d77b88c326168557444a445765b5a69de6f AppOps: Add support for nfc operation Add support for nfc operation Change-Id: I0ca617b11d3f65f80cc49c3f629312e2fee1ba91 AppOps: Add mobile data-on permission control. Add mobile data-on permission control. Change-Id: I0956fb1575addb5f4e522e664a80442120190b86 Author: Michael Bestas <[email protected]> Date: Sat Mar 8 03:18:34 2014 +0200 Settings: Convert AppOps array items to string references * Avoid future breakage This will need conversion of all AOSP translated arrays to strings Change-Id: I2e52e4013d1232d529ce5b9e3aae3502c42e938a Author: Shashank Mittal <[email protected]> Date: Thu Mar 6 17:16:49 2014 -0800 AppOps: Add 'Always ask' option under appOps setting. Add always ask option for each operation. Change-Id: Ia4f331a5b7d0b1c8ae6946c55a4f78818fe0454f Author: Shashank Mittal <[email protected]> Date: Fri Aug 1 13:05:35 2014 -0700 AppOps: Use switch widget for non-strict ops. There are few Ops for which 'Always Ask' mode is not allwoed. So use switch widget to control such Ops. Change-Id: Ic7464a207c00e4cb9efff57c1f060e04379c1ee7 Author: Chirayu Desai <[email protected]> Date: Mon Dec 7 14:07:11 2015 -0800 Allow disabling the privacy guard notification - port from cm-12.1 (1/3) Change-Id: Iebf4545c1a65b10036a4865bae29d14e86b12d07 Author: Roman Birg <[email protected]> Date: Mon Nov 2 17:34:00 2015 -0800 Fix advanced privacy guard screen Change-Id: I1064f2df748b21384f53219b87645f1569f595d5 Signed-off-by: Roman Birg <[email protected]> Author: Sam Mortimer <[email protected]> Date: Thu Oct 3 13:51:31 2013 -0700 AppOps: menu options to show/hide user and system apps Change-Id: Ia55364c361db949a891e4b53a757ee4dff519eb6 Author: Danny Baumann <[email protected]> Date: Wed Oct 2 22:24:14 2013 -0700 [1/2] AppOps: Show allowed/ignored counts Change-Id: Ia27737155c33e934df9a2a1fcff88379240fd096 Author: Sam Mortimer <[email protected]> Date: Sun Dec 1 21:39:07 2013 -0800 AppOps: only apply app type filters to summary screen *) If buildState() is called for a single package, do not apply hide user/system app filters. *) Fixes show detail display when called via long press in privacyguard and an AppOp hide filter is ticked. Change-Id: If31d094fb989836ab6829daeefe820695032c0ed Author: Diogo Ferreira <[email protected]> Date: Mon Jan 5 18:19:12 2015 +0000 privacyguard: Add Superuser summary Adds superuser summary to the privacy guard "Advanced" menu, this is useful for auditing purposes. The tab is only visible when root for apps is enabled. Change-Id: I0b71c51d10e44e69102c311e526cdb1fde9bda26 Author: Danesh M <[email protected]> Date: Mon Mar 21 13:56:22 2016 -0700 Settings : Fix default privacy guard preference Ensure we write to the correct table. CYNGNOS-2264 Change-Id: I1260cf665080631e3e2ec19b371a79eee273c6d2 Author: Lars Greiss <[email protected]> Date: Sat Apr 25 03:15:15 2015 +0300 Launch app privacy settings when tapping on PG notification (2/2) Based on SlimRoms/packages_apps_Settings@46bb144 JIRA: CYAN-6077 Change-Id: I8632e8c944c1d5d7ad2fb2a2276bae5fe2d4a0a0 Author: Michael Bestas <[email protected]> Date: Mon Jan 12 00:09:26 2015 +0200 Update privacy guard reset icon Change-Id: Ia636b08fea0d21c0185d053ecf601d1ddcf5a828 Author: jrizzoli <[email protected]> Date: Fri Apr 24 15:00:28 2015 +0200 Settings: update dashboard icons * Lockscreen: drawable from quicktoggles * Performance: chip * Privacy: shield * Sounds: speaker Change-Id: I227778583d073c1d3fdfb727dcc32c949c535847 Signed-off-by: jrizzoli <[email protected]> Author: blunden <[email protected]> Date: Sat Dec 6 20:18:20 2014 +0100 Update the Privacy category drawable Replace the current ones with new vector drawables Change-Id: I27a6778d876672c78469b886e2574baa149aad80 Author: Diogo Ferreira <[email protected]> Date: Mon Jan 5 17:56:53 2015 +0000 PrivacyGuard: Tint the enabled icon The enabled icon was white and when enabled, the icon would get the exact same color as the background, rendering impossible to see. Change-Id: I4dc2b52cfca46abf2eff28a0b25918d42cf39f09 Author: nickdoherty81 <[email protected]> Date: Mon Jan 5 00:07:56 2015 -0500 Check boxes to Switches in PrivacyGuardPerfs Change-Id: I329df30a6a095a6a5f5829d8b627b00769e18685 Author: Diogo Ferreira <[email protected]> Date: Wed Jan 14 16:06:23 2015 +0000 appops: Load the app list asynchronously The AppList is pretty big and it is loading in the UI thread. This is noticeable even on high-end chips and there is a definite possibility that it throws an ANR on lower-end ones. This patchset adds an asynchronous loader and updates the privacy guard to use it. Change-Id: I81f3fb64604af07a351f8cbdfffa7454389e2cee Author: Adnan Begovic <[email protected]> Date: Tue Jan 27 18:11:19 2015 -0800 Settings: Fix off-by-one SectionIndexer in PrivacyGuard. Change-Id: If97876214d6f532ca4e5a09f09d881cd4fbf0231 Author: Adnan Begovic <[email protected]> Date: Wed Jan 28 15:53:35 2015 -0800 Settings: Fix inflate exception on search. Dynamically replace nested fragment. When PrivacyGuard is opened, the parent fragment would inflate the layout which contained a nested fragment. This is bad behavior. Since we couldn't keep track of the fragments lifecycle, the fragment we instantiated during inflation would cause an inflate exception if and when we toggled the search view within the current context. Mitigate the crash by programmatically replacing the fragment after instantiating it once. AndroidRuntime E FATAL EXCEPTION: main E Process: com.android.settings, PID: 12372 E android.view.InflateException: Binary XML file line MoKee#21: Error inflating class fragment E at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) E at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) E at android.view.LayoutInflater.inflate(LayoutInflater.java:504) ... E Caused by: java.lang.IllegalArgumentException: Binary XML file line MoKee#21: Duplicate id 0x7f1001a2, tag nul l, or parent id 0xffffffff with another fragment for com.android.settings.privacyguard.PrivacyGuardPrefs E at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2120) E at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:177) E at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733) E ... 25 more Change-Id: I6820ad7d35814f150eedf91140e21c0b8e23322b Author: Steve Kondik <[email protected]> Date: Mon Mar 9 16:05:32 2015 +0000 settings: Use consistent headers for Privacy Guard * Show "Privacy Guard" instead of "App ops" in advanced settings Change-Id: I98107ba3ad94ba22bbd4dc9e92ea97a36f664ab8 Author: Matt Garnes <[email protected]> Date: Fri May 15 15:55:44 2015 -0700 Do not allow privacy guard for core system apps. Hide any applications that have the system UID as well as System UI from privacy guard. Enabling this on these core apps can have disastrous consequences, since many privacy guard authorization requests will queue up. This can cause the system process or System UI to be killed when they ANR while they wait at the end of a very long queue for the user to authorize them. By using privacy guard, you are trusting that the system will control and protect these permissions in the first place; there is no need to protect the system from itself. Change-Id: I478d6a6783a4c06fa7ad01a96c413290b232636c Author: Gianmarco Reverberi <[email protected]> Date: Tue Jun 2 19:30:45 2015 +0200 PrivacyGuard: restore ListView position on resume, for real ListView gets reloaded each time the activity is resumed, so we have to restore the position after LoadManager finishes its job Change-Id: I8f05027aaf8ef85481ecb578efa2c2d2c6c6256d Author: Roman Birg <[email protected]> Date: Wed Sep 9 12:05:38 2015 -0700 Settings: persist privacy guard dialogs across rotates Ref: CYNGNOS-933 Change-Id: I778ff0152dd4a1c0152dca68e82cc89a41f88508 Signed-off-by: Roman Birg <[email protected]> Author: Steve Kondik <[email protected]> Date: Mon Sep 12 01:29:07 2016 -0700 settings: Fix viewpager tabs not showing on AppOpsSummary Change-Id: I311c61559177ea733809f510f017ef613915f3d4 Author: Gabriele M <[email protected]> Date: Wed Mar 15 22:05:46 2017 +0100 AppOpsDetails: Check app permissions safely checkOp() throws a SecurityException when the application is not allowed to perform the given operation. Use checkOpNoThrow() so that no exception is thrown. If the operation is not permitted, AppOpsManager.MODE_ERRORED will be returned and AppOpsDetails will treat it as MODE_IGNORED (i.e. don't allow). BUGBASH-52 Change-Id: Ic3177a24ae52438594e65cd19e29a86c1ee299e8 Author: Gabriele M <[email protected]> Date: Sun Aug 6 13:08:51 2017 +0200 Settings: Always show Privacy Guard permissions Enabling Privacy Guard for an app simply means switching a set of operations to MODE_ASK, independently on whether the application actually declared those ops (though a permission) or not. The framework keeps track only of the ops with a non-default value. As consequence, all the ops set by Privacy Guard that aren't declared by the app through its manifest are effectively lost when set to their default value and the settings won't show them. Never hide the Privacy Guard ops to provide a consistent UI. Change-Id: Iafcf058f5e2074982bf45f8c82ef8d027b9358f0 Author: Gabriele M <[email protected]> Date: Fri Sep 1 01:46:30 2017 +0200 AppOpsState: Hide undeclared Privacy Guard OPs Since commit f02e040 ("Settings: Always show Privacy Guard permissions"), all the Privacy Guard OPs are shown independently on whether the application declared the associated permission or not. This solved the UI inconsistencies, but it's still confusing. Instead of always showing these special OPs, hide them, unless unless the application declared the associated permission or the OP doesn't have an associated permission. Note: if a Privacy Guard OP is not associated to any permission it will appear for every application with Privacy Guard enabled, bringing back the UI inconsistency solved with f02e040. This doesn't happen with the current set of OPs. Change-Id: Iddc92b3547187e24140a328d50c5ac09bc1a7ccfa Author: Tobias Tefke <[email protected]> Date: Sun, 11 Mar 2018 17:58:28 +0100 Privacy Guard: Add icon for VPN permission Change-Id: I5f940c1966f9df755bc2643414b34b0303eac0a1 Author: Tobias Tefke <[email protected]> Date: Sun, 11 Mar 2018 11:33:37 +0100 Privacy Guard: Avoid NPE when tinting permission icons If PG can't retrieve the icon for a certain permission, a null reference is returned. If tint is being set afterwards, a NPE will be thrown. Change-Id: I266579ad60e6d0fc3323d07bcd9bcd9c0d4bd990 Author: Dan Pasanen <[email protected]> Date: Thu, 15 Mar 2018 20:40:44 -0500 PrivacyGuard: add a couple more missing icons * Add new icon for "Turn on screen" (ic_phone_android from https://github.com/google/material-design-icons) * Use music note icon for media volume Change-Id: I9c8d314906b973319c7aeb7d0d173c7a12925b94 Change-Id: Id810e21d735adcf8fb8c32519828ef9a23f3e684
- Loading branch information