Merge "Don't reset mode for OP_REQUEST_INSTALL_PACKAGES." into rvc-dev am: b8fd5923a4 am: c3940d543b

Change-Id: I3f02c0d98a5ba594c71e32fad69e9ec278942da6
This commit is contained in:
TreeHugger Robot
2020-05-29 06:39:01 +00:00
committed by Automerger Merge Worker

View File

@@ -208,6 +208,11 @@ public final class PermissionPolicyService extends SystemService {
case android.Manifest.permission.ACCESS_NOTIFICATIONS:
case android.Manifest.permission.MANAGE_IPSEC_TUNNELS:
continue;
case android.Manifest.permission.REQUEST_INSTALL_PACKAGES:
// Settings allows the user to control the app op if it's not in the default
// mode, regardless of whether the app has requested the permission, so we
// should not reset it.
continue;
default:
final int appOpCode = AppOpsManager.permissionToOpCode(
appOpPermissionInfo.name);