The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ida6513002f8fd845a385924be290b720f06c4748
A new user id parameter is added to the
IPackageManager#getAppOpPermissionPackages API. Update the new api
usage to the Settings application.
Bug: 229684723
Test: atest SettingsUnitTests
Test: m -j RunSettingsRoboTests \
ROBOTEST_FILTER="AlarmsAndRemindersDetailsTest|
AlarmsAndRemindersDetailPreferenceControllerTest"
Change-Id: I8c90f0a57426c669478367004571cca5dfb05cb6
UM is being made @UserHandleAware, so using an explicit method avoids ambiguity.
Bug: 201679968
Test: (No-op) compiles and treehugger
Change-Id: If067af7ced5017a9689cafbf99ceec1d26c06b3b
Adding a settings screen to control the permission SCHEDULE_EXACT_ALARM.
Apps can start this by starting a newly introduced API intent
REQUEST_SCHEDULE_EXACT_ALARM.
Test: make -j RunSettingsRoboTests
Manually by UI inspection:
Settings -> Apps -> Special App access -> Alarms and Reminders
or by running:
adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM
Bug: 171306433
Bug: 171305516
Change-Id: I1293d38fc50a22b2af46f80ab24f676ed632f964
AppStateAppOpsBridge#getEntries returns null if no app
is requesting AppStateAppOpsBridge#mPermissions,
which would cause the settings app to crash in
AppStateAppOpsBridge#loadAllExtraInfo or
AppStateAppOpsBridge#loadAppOpsStates.
Try to skip null case here and set null for extraInfo
when we get null from AppStateAppOpsBridge#getEntries.
Change-Id: Iac03ec11869eeac62fa055da26b4b7a10dc65bb8
Fix: 147479269
Test: Open All files access and no crash.
Bug: 148374455
Test: Manual
Test: Create three packages; 1) only request PACKAGE_USAGE_STATS, 2) only request LOADER_USAGE_STATS, 3) request both
Test: Go to Settings -> Apps & Notifications -> Special app access
Test: See that there is only a single entry for "Usage access"
Test: Under "Usage access", see all three test apps appear
Test: Disable access for each application and verify that only the appop for the declared permisson is flipped using
Test: adb shell cmd appops get <<PACKAGE_NAME>>
Change-Id: I7741a703fd4494832347e51e113adf974cc31d2b
Adds a Special App Access setting for the app-op
OP_MANAGE_EXTERNAL_STORAGE. All apps requesting the corresponding
permission will be displayed in the settings page. Toggling the
preference switch for an app will grant/revoke the app-op.
All of the external references to the permission, app-op and their
corresponding activities and logic use the name "Manage External
Storage". All of the external displays and strings use the name "All
files access"
Test: * Install app with uses-permission MANAGE_EXTERNAL_STORAGE
* Observe it appearing the All files access page
* Toggle the switch and observe the change in
'adb shell dumpsys appops'
Bug: 146425146
Change-Id: If5c9c5daa3616a3310c090283acfda933bf9df26
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Should be PRIVATE (the default) and not NONE since it's called from the
regular constructor for the object.
Bug: Clean-up
Test: Compiles
Change-Id: I9eb8881ed03dcddd1b478e313f5a314b338fccd7
- Add the wrapper package and move all wrappers to the wrapper package.
- Get rid of some wrapper interface/impl implementation and have a
wrapper class directly.
Bug: 65634579
Test: make RunSettingsRoboTests
Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
- PackageManager.getPackageInfo() can return null. When trying to check
the app permission info, check for null package info and only process
the permission info when package info is available.
- Update usage of PackageManager.MATCH_UNINSTALLED_PACKAGES to
PackageManager.MATCH_ANY_USER, as the implementation for querying
packages for other users have been changed.
- Add PackageManager APIs used by AppStateAppOpsBridge to
IPackageManagerWrapper for test purpose.
- Change UserManager.get() to Context.getSystemService() to fix test
failure.
Change-Id: I52de924618aa252ffaae02b8f06ebe5b1d0def61
Fix: 37409266
Test: make RunSettingsRoboTests
Change the implementation of AppStateAppOpsBridge to handle multiple
requested permissions in one operation due to the merging of
CHANGE_NETWORK_STATE permission with WRITE_SETTINGS.
This change will affect the packages that will be listed under the
"Write system settings" option in Settings->Apps->[Gear/Cog].
Change-Id: I7d2304d2846b6f505a7b1c3fcf53e7a9bd184ed5
page instead of the top level one
Settings:
Added two activities to handle app-specific Intent when app invoke permission
management UI.
SettingsActivity:
Added two fragment classes to handle app-specific Intent when app invoke permission
management UI.
AndroidManifest.xml:
We handle both Intent to top level settings and app-specific management UI for
app ops protected permissions.
AppStateAppOpsBridge:
Added a new field to PermissionState to keep track of permission declared vs one
that is actually granted during install time.
AppState{Overlay/Usage/WriteSettings}Bridge:
Updated the fields affected by changes in PermissionState.
{DrawOverlay/UsageAccess/WriteSettings}Details:
Disabled the toggling of permission if the app did not declare for the asked
permission.
Change-Id: Ibf63e4d9a4fbf7899a93d2176abb1204c4f75557
explicit toggle to be enabled through Settings via Apps -> Advanced Apps.
Added new and refactored an old xml to define the UX for two new Preferences
in Advanced Settings. Modified the existing AdvancedAppSettings to add
control flow for two new settings. Also enriched ManageApplications to
handle these cases. Added additional strings in xml/values/strings.xml
to support these settings. Also defined new classes to handle these the
toggle of these permissions per app.
Refactored codes from AppStateUsageBridge to a generic AppStateAppOpsBridge so
that future usages related to AppOps can inherit from this class.
Change-Id: I43b81282a063e05844c7805556a6d05cfc02bcdb