[ECM] Defer changing op mode to MODE_DEFAULT
In Android V, we changed the default mode of OP_ACCESS_RESTRICTED_SETTINGS from MODE_ALLOWED to MODE_DEFAULT. This means all apps will, immediately upon being installed, have this op's mode set to MODE_DEFAULT. But, this resulted in a bug: an app with this op set to MODE_ALLOWED on Android pre-V will, as soon as the device upgrades to Android V, suddenly change to MODE_DEFAULT. This is due to a pre-existing bug with the app op system. This change changes the default mode back to MODE_ALLOWED to avoid this, and updates to MODE_DEFAULT upon app installation. Bug: 349456985 Flag: android.permission.flags.enhanced_confirmation_mode_apis_enabled Test: atest CtsPermissionUiTestCases:android.permissionui.cts.EnhancedConfirmationManagerTest Change-Id: I504449fa81219d9399fa6122952b01cbf2f94d7f
Loading
Please register or sign in to comment