Commit 7c1dd11f authored by Committed by Arne Coucheron
[2/2] Settings: Privacy Guard
* This has been partially split into CMParts. The AppOps functionality still lives here. Pulled together mostly (if not all) from: Author: Steve Kondik <email@example.com> 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 <firstname.lastname@example.org> Date: Thu Jan 16 19:01:23 2014 -0500 Settings: Fix up top level "Privacy" section Change-Id: Id4dbda10a891c793bc6eb3c42807cc0e3f6092cc Author: Danny Baumann <email@example.com> Date: Fri Nov 8 13:37:07 2013 +0100 Add back privacy guard manager. Change-Id: Ic9fbbae137bb8425fe72a6cdb2f17117351b5709 Author: Chirayu Desai <firstname.lastname@example.org> 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@example.com> 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 Change-Id: I2e10cb4d395e2e7e5141d2fadada9e9b21cd7fbf 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 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 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 AppOps: Add 'Always ask' option under appOps setting. Add always ask option for each operation. Change-Id: Ia4f331a5b7d0b1c8ae6946c55a4f78818fe0454f 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 Allow disabling the privacy guard notification - port from cm-12.1 (1/3) Change-Id: Iebf4545c1a65b10036a4865bae29d14e86b12d07 Fix advanced privacy guard screen Change-Id: I1064f2df748b21384f53219b87645f1569f595d5 Signed-off-by: Roman Birg <firstname.lastname@example.org> [1/2] Settings AppOps: show/hide app type and allow/deny counters Squash of: Author: Sam Mortimer <email@example.com> Date: Thu Oct 3 13:51:31 2013 -0700 AppOps: menu options to show/hide user and system apps Change-Id: Ia55364c361db949a891e4b53a757ee4dff519eb6 Author: Sam Mortimer <firstname.lastname@example.org> Author: Danny Baumann <email@example.com> Date: Wed Oct 2 22:24:14 2013 -0700 [1/2] AppOps: Show allowed/ignored counts Change-Id: Ia27737155c33e934df9a2a1fcff88379240fd096 Author: Sam Mortimer <firstname.lastname@example.org> 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 Change-Id: I4d6f37b3923eb9bc98d67101d6f0ef481a427682 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 pg Change-Id: I4e9630a0bf606e863e191e24ce448bbeb5ee7ebb Settings : Fix default privacy guard preference Ensure we write to the correct table. CYNGNOS-2264 Change-Id: I1260cf665080631e3e2ec19b371a79eee273c6d2 Launch app privacy settings when tapping on PG notification (2/2) Based on https://github.com/SlimRoms/packages_apps_Settings/commit/46bb1442aa96aad6890e3ce7b6f3c0466ababf25 JIRA: CYAN-6077 Change-Id: I8632e8c944c1d5d7ad2fb2a2276bae5fe2d4a0a0 Update privacy guard reset icon Change-Id: Ia636b08fea0d21c0185d053ecf601d1ddcf5a828 Pick missing patch from cm12.1 for missing privacy icon 40304370 Author: jrizzoli <email@example.com> Date: Fri Apr 24 15:00:28 2015 +0200 Settings: update dashboard icons 1a1820d2 Author: blunden <firstname.lastname@example.org> Date: Sat Dec 6 20:18:20 2014 +0100 Update the Privacy category drawable Change-Id: I587622df9a75d69405b17d60f0e8b0046ecf94f6 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 Check boxes to Switches in PrivacyGuardPerfs Change-Id: I329df30a6a095a6a5f5829d8b627b00769e18685 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 Settings: Fix off-by-one SectionIndexer in PrivacyGuard. Change-Id: If97876214d6f532ca4e5a09f09d881cd4fbf0231 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 #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 #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 settings: Use consistent headers for Privacy Guard * Show "Privacy Guard" instead of "App ops" in advanced settings Change-Id: I98107ba3ad94ba22bbd4dc9e92ea97a36f664ab8 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 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 Settings: persist privacy guard dialogs across rotates Ref: CYNGNOS-933 Change-Id: I778ff0152dd4a1c0152dca68e82cc89a41f88508 Signed-off-by: Roman Birg <email@example.com>
Showing with 830 additions and 99 deletions
This diff is collapsed.