Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cm_strings.xml #21

Open
wants to merge 1 commit into
base: kk_mkt
Choose a base branch
from
Open

Update cm_strings.xml #21

wants to merge 1 commit into from

Conversation

HaaiSo
Copy link

@HaaiSo HaaiSo commented Sep 21, 2014

改進翻譯

mokeeopensource pushed a commit that referenced this pull request Jan 30, 2015
… 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
mokeeopensource pushed a commit that referenced this pull request Apr 1, 2015
… 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
gimmeitorilltell pushed a commit to gimmeitorilltell/android_packages_apps_Settings that referenced this pull request Apr 7, 2015
… 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
mokeeopensource pushed a commit that referenced this pull request Feb 15, 2017
 * This has been partially split into CMParts. The
   AppOps functionality still lives here.

Pulled together mostly (if not all) from:

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

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 <[email protected]>

[1/2] Settings AppOps: show/hide app type and allow/deny counters

Squash of:

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: Sam Mortimer <[email protected]>
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

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 SlimRoms/packages_apps_Settings@46bb144

JIRA: CYAN-6077
Change-Id: I8632e8c944c1d5d7ad2fb2a2276bae5fe2d4a0a0

Update privacy guard reset icon

Change-Id: Ia636b08fea0d21c0185d053ecf601d1ddcf5a828

Pick missing patch from cm12.1 for missing privacy icon

4030437
Author: jrizzoli <[email protected]>
Date:   Fri Apr 24 15:00:28 2015 +0200
Settings: update dashboard icons

1a1820d
Author: blunden <[email protected]>
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 protected]>
mokeeopensource pushed a commit that referenced this pull request Feb 2, 2018
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 #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

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: Iddc92b3547187e24140a328d50c5ac09bc1a7ccf

Author: Danny Baumann <[email protected]>
Date:   Wed Feb 8 13:44:07 2017 +0100

    Improve layout of app ops details screen.

    Change-Id: I3ee30280f6542f2c01ba39c2f821094942b9e943

Author: Michael W <[email protected]>
Date:   Fri Aug 11 15:47:05 2017 +0200

    AppOps: Redesign

    * To match other settings, overhaul the current view by
      converting it to a PreferenceScreen
    * While on it, fix bug with icons not shown if previous perm
      would have the same icon
    * Add some additional icons for permissions

    BUGBASH-621

    Change-Id: I38fc01e02cd1711ee943717c42af4f40c51d94a6

Author: Luca Stefani <[email protected]>
Date:   Sun Aug 13 21:05:23 2017 +0200

    AppOps: Switch to an HashMap

    * Remove now unneeded getDrawableForOp function

    Change-Id: Iefefd55797bee1ceebfcf7ab18bebaa9b56bdd19

Author: Gabriele M <[email protected]>
Date:   Thu Aug 31 22:41:06 2017 +0200

    AppOpsDetails: Generate correct summary when changing list prefs

    MODE_ENTRIES are strings of numbers, not names.

    Change-Id: I749a808951d5359e92b6974714874f705c373342

Author: Michael W <[email protected]>
Date:   Sat Nov 11 17:21:50 2017 +0100

    AppOps: Add icon for "Toggle cellular data"

    Change-Id: I2b2d7bcbf2eb97d5a97df3455daea32384333566

Author: Michael W <[email protected]>
Date:   Sun Nov 12 15:03:25 2017 +0100

    AppOps: Add info if app doesn't request any blockable permissions

    * Instead of only showing a blank page, actually show an info
    * This makes the screen look like it's actually blank on
      purpose

    Change-Id: Ibae3ada4ecf8559c3000028f80ff5cf054410699

Author: Michael W <[email protected]>
Date:   Sun Nov 19 12:06:27 2017 +0100

    AppOps: Refactor code

    * Functions should be short
    * Gain readability by moving around code

    Change-Id: I227aaa8e0b259555fb74d9b52c3a69d72638ef10

Author: Michael W <[email protected]>
Date:   Thu Jan 11 22:36:00 2018 +0100

    AppOps: Add missing icons for alarm, bluetooth, stats, toast

    * Obviously missing, so adding them

    Change-Id: Ic36991db468fb2c2888c243971ac381d08ff60ff

Author: AdrianDC <[email protected]>
Date:   Fri Jan 1 15:21:52 2016 +0100

    Settings: Apps started on boot shortcut in memory settings

     * Implement an intent extra to retrieve a tab target
     * Use a tab identifer from apps_ops_categories_cm
        to make sure the selection is correct or ignored

    Change-Id: I79d963ecbadc624dc45a398387a348691318b6be
    Signed-off-by: AdrianDC <[email protected]>

Author: Adrian DC <[email protected]>
Date:   Sat Aug 6 00:18:09 2016 +0200

    Settings: Show only one tab on PrivacyGuard direct access

     * Allow an intent request to a specific tab to be isolated,
        giving access only to the expected settings

     * "Apps started on boot" opens only Bootup
     * "Manage root accesses" opens only Root Access

     * Related to the following commits
        Ia5bc9d56fb11700b19d73336fad13c0a936091ff
        I79d963ecbadc624dc45a398387a348691318b6be

    Change-Id: I5a720fe2a8abe5fdf1a1b91c054d8b3a57d6cc5d
    Signed-off-by: Adrian DC <[email protected]>

Author: Danny Baumann <[email protected]>
Date:   Mon Sep 5 09:14:26 2016 +0200

    Fix AIOOBE with root access disabled.

    Page title and template array lengths got out of sync if root access was
    disabled. Make sure this doesn't happen anymore by combining titles and
    templates into a single list prior to filtering.

    Change-Id: I069db9b9925887d6d80592eabe93b33abeaf0fe8
    JIRA: CYAN-8028

Author: Michael W <[email protected]>
Date:   Tue Jan 9 23:46:00 2018 +0100

    AppOpsDetails: Display all missing ops

    * Add a new template for the remaining ops
    * Set the visibility of all ops to true

    * Inspired by Gabriele M <[email protected]>

    Change-Id: I4f160a995a294dfbfd3013bbd29c0a9c8766ff24

Change-Id: I407a2a9690fa912e8e232883e74a0d6a0d8d80aa
mokeeopensource pushed a commit that referenced this pull request Feb 11, 2018
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 #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

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: Iddc92b3547187e24140a328d50c5ac09bc1a7ccf

Author: Danny Baumann <[email protected]>
Date:   Wed Feb 8 13:44:07 2017 +0100

    Improve layout of app ops details screen.

    Change-Id: I3ee30280f6542f2c01ba39c2f821094942b9e943

Author: Michael W <[email protected]>
Date:   Fri Aug 11 15:47:05 2017 +0200

    AppOps: Redesign

    * To match other settings, overhaul the current view by
      converting it to a PreferenceScreen
    * While on it, fix bug with icons not shown if previous perm
      would have the same icon
    * Add some additional icons for permissions

    BUGBASH-621

    Change-Id: I38fc01e02cd1711ee943717c42af4f40c51d94a6

Author: Luca Stefani <[email protected]>
Date:   Sun Aug 13 21:05:23 2017 +0200

    AppOps: Switch to an HashMap

    * Remove now unneeded getDrawableForOp function

    Change-Id: Iefefd55797bee1ceebfcf7ab18bebaa9b56bdd19

Author: Gabriele M <[email protected]>
Date:   Thu Aug 31 22:41:06 2017 +0200

    AppOpsDetails: Generate correct summary when changing list prefs

    MODE_ENTRIES are strings of numbers, not names.

    Change-Id: I749a808951d5359e92b6974714874f705c373342

Author: Michael W <[email protected]>
Date:   Sat Nov 11 17:21:50 2017 +0100

    AppOps: Add icon for "Toggle cellular data"

    Change-Id: I2b2d7bcbf2eb97d5a97df3455daea32384333566

Author: Michael W <[email protected]>
Date:   Sun Nov 12 15:03:25 2017 +0100

    AppOps: Add info if app doesn't request any blockable permissions

    * Instead of only showing a blank page, actually show an info
    * This makes the screen look like it's actually blank on
      purpose

    Change-Id: Ibae3ada4ecf8559c3000028f80ff5cf054410699

Author: Michael W <[email protected]>
Date:   Sun Nov 19 12:06:27 2017 +0100

    AppOps: Refactor code

    * Functions should be short
    * Gain readability by moving around code

    Change-Id: I227aaa8e0b259555fb74d9b52c3a69d72638ef10

Author: Michael W <[email protected]>
Date:   Thu Jan 11 22:36:00 2018 +0100

    AppOps: Add missing icons for alarm, bluetooth, stats, toast

    * Obviously missing, so adding them

    Change-Id: Ic36991db468fb2c2888c243971ac381d08ff60ff

Author: AdrianDC <[email protected]>
Date:   Fri Jan 1 15:21:52 2016 +0100

    Settings: Apps started on boot shortcut in memory settings

     * Implement an intent extra to retrieve a tab target
     * Use a tab identifer from apps_ops_categories_cm
        to make sure the selection is correct or ignored

    Change-Id: I79d963ecbadc624dc45a398387a348691318b6be
    Signed-off-by: AdrianDC <[email protected]>

Author: Adrian DC <[email protected]>
Date:   Sat Aug 6 00:18:09 2016 +0200

    Settings: Show only one tab on PrivacyGuard direct access

     * Allow an intent request to a specific tab to be isolated,
        giving access only to the expected settings

     * "Apps started on boot" opens only Bootup
     * "Manage root accesses" opens only Root Access

     * Related to the following commits
        Ia5bc9d56fb11700b19d73336fad13c0a936091ff
        I79d963ecbadc624dc45a398387a348691318b6be

    Change-Id: I5a720fe2a8abe5fdf1a1b91c054d8b3a57d6cc5d
    Signed-off-by: Adrian DC <[email protected]>

Author: Danny Baumann <[email protected]>
Date:   Mon Sep 5 09:14:26 2016 +0200

    Fix AIOOBE with root access disabled.

    Page title and template array lengths got out of sync if root access was
    disabled. Make sure this doesn't happen anymore by combining titles and
    templates into a single list prior to filtering.

    Change-Id: I069db9b9925887d6d80592eabe93b33abeaf0fe8
    JIRA: CYAN-8028

Author: Michael W <[email protected]>
Date:   Tue Jan 9 23:46:00 2018 +0100

    AppOpsDetails: Display all missing ops

    * Add a new template for the remaining ops
    * Set the visibility of all ops to true

    * Inspired by Gabriele M <[email protected]>

    Change-Id: I4f160a995a294dfbfd3013bbd29c0a9c8766ff24

Change-Id: I407a2a9690fa912e8e232883e74a0d6a0d8d80aa
mokeeopensource pushed a commit that referenced this pull request Jan 5, 2019
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 #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

    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
dragonJACson pushed a commit to dragonJACson/android_packages_apps_Settings that referenced this pull request Sep 14, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant