Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 185f7baf authored by mrulhania's avatar mrulhania
Browse files

Fix formating in AppIdPermissionPolicy

Bug: N/A
Test: build
Change-Id: I373b432d4eb5827ef2ab00bc16bc5668b7f6a54e
parent c0672ad4
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -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
@@ -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)
@@ -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)
            }