Bug: 22718745 Intents to 'draw over other apps' should go direct to the package's
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
This commit is contained in:
@@ -143,6 +143,8 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc
|
||||
|
||||
boolean isAllowed = mOverlayState.isPermissible();
|
||||
mSwitchPref.setChecked(isAllowed);
|
||||
// you cannot ask a user to grant you a permission you did not have!
|
||||
mSwitchPref.setEnabled(mOverlayState.permissionDeclared);
|
||||
mOverlayPrefs.setEnabled(isAllowed);
|
||||
getPreferenceScreen().removePreference(mOverlayPrefs);
|
||||
|
||||
|
Reference in New Issue
Block a user