Loading services/permission/java/com/android/server/permission/access/permission/AppIdPermissionPolicy.kt +8 −11 Original line number Diff line number Diff line Loading @@ -63,11 +63,8 @@ class AppIdPermissionPolicy : SchemePolicy() { private val privilegedPermissionAllowlistViolations = MutableIndexedSet<String>() /** * Test-only switch to enforce signature permission allowlist even on debuggable builds. */ @Volatile var isSignaturePermissionAllowlistForceEnforced = false /** Test-only switch to enforce signature permission allowlist even on debuggable builds. */ @Volatile var isSignaturePermissionAllowlistForceEnforced = false override val subjectScheme: String get() = UidUri.SCHEME Loading Loading @@ -108,8 +105,8 @@ class AppIdPermissionPolicy : SchemePolicy() { val changedPermissionNames = MutableIndexedSet<String>() packageNames.forEachIndexed { _, packageName -> // The package may still be removed even if it was once notified as installed. val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed adoptPermissions(packageState, changedPermissionNames) addPermissionGroups(packageState) addPermissions(packageState, changedPermissionNames) Loading @@ -122,14 +119,14 @@ class AppIdPermissionPolicy : SchemePolicy() { } packageNames.forEachIndexed { _, packageName -> val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val installedPackageState = if (isSystemUpdated) packageState else null evaluateAllPermissionStatesForPackage(packageState, installedPackageState) } packageNames.forEachIndexed { _, packageName -> val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed newState.externalState.userIds.forEachIndexed { _, userId -> inheritImplicitPermissionStates(packageState.appId, userId) } Loading Loading
services/permission/java/com/android/server/permission/access/permission/AppIdPermissionPolicy.kt +8 −11 Original line number Diff line number Diff line Loading @@ -63,11 +63,8 @@ class AppIdPermissionPolicy : SchemePolicy() { private val privilegedPermissionAllowlistViolations = MutableIndexedSet<String>() /** * Test-only switch to enforce signature permission allowlist even on debuggable builds. */ @Volatile var isSignaturePermissionAllowlistForceEnforced = false /** Test-only switch to enforce signature permission allowlist even on debuggable builds. */ @Volatile var isSignaturePermissionAllowlistForceEnforced = false override val subjectScheme: String get() = UidUri.SCHEME Loading Loading @@ -108,8 +105,8 @@ class AppIdPermissionPolicy : SchemePolicy() { val changedPermissionNames = MutableIndexedSet<String>() packageNames.forEachIndexed { _, packageName -> // The package may still be removed even if it was once notified as installed. val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed adoptPermissions(packageState, changedPermissionNames) addPermissionGroups(packageState) addPermissions(packageState, changedPermissionNames) Loading @@ -122,14 +119,14 @@ class AppIdPermissionPolicy : SchemePolicy() { } packageNames.forEachIndexed { _, packageName -> val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val installedPackageState = if (isSystemUpdated) packageState else null evaluateAllPermissionStatesForPackage(packageState, installedPackageState) } packageNames.forEachIndexed { _, packageName -> val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed val packageState = newState.externalState.packageStates[packageName] ?: return@forEachIndexed newState.externalState.userIds.forEachIndexed { _, userId -> inheritImplicitPermissionStates(packageState.appId, userId) } Loading