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

Commit 709427d7 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6553159 from 43286474 to rvc-release

Change-Id: I0b7fdca6197ccbeed278a304653a85f11e97fd35
parents 01530204 43286474
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -264,8 +264,12 @@ class AppPermGroupUiInfoLiveData private constructor(
    }

    private fun getIsSpecialLocationState(): Boolean? {
        if (!isSpecialLocation) {
            return null
        }

        val userContext = Utils.getUserContext(app, user)
        if (isSpecialLocation) {
        if (LocationUtils.isLocationGroupAndProvider(userContext, permGroupName, packageName)) {
            return LocationUtils.isLocationEnabled(userContext)
        }
        // The permission of the extra location controller package is determined by the
+6 −6
Original line number Diff line number Diff line
@@ -117,16 +117,16 @@ class LightAppPermGroupLiveData private constructor(
        // Determine if this app permission group is a special location package or provider
        var specialLocationGrant: Boolean? = null
        val userContext = Utils.getUserContext(app, user)
        if (isSpecialLocation) {
            specialLocationGrant = LocationUtils.isLocationEnabled(app)
        }
        // The permission of the extra location controller package is determined by the status of
        // the controller package itself.
        if (LocationUtils.isLocationGroupAndControllerExtraPackage(app, permGroupName,
        if (LocationUtils.isLocationGroupAndProvider(userContext, permGroupName, packageName)) {
            specialLocationGrant = LocationUtils.isLocationEnabled(userContext)
        } else if (LocationUtils.isLocationGroupAndControllerExtraPackage(app, permGroupName,
                packageName)) {
            // The permission of the extra location controller package is determined by the status
            // of the controller package itself.
            specialLocationGrant = LocationUtils.isExtraLocationControllerPackageEnabled(
                userContext)
        }

        val hasInstallToRuntimeSplit = hasInstallToRuntimeSplit(packageInfo, permissionMap)
        value = LightAppPermGroup(packageInfo, permGroup.groupInfo, permissionMap,
            hasInstallToRuntimeSplit, specialLocationGrant)