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

Commit ba39bd6e authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[Install-unknown-apps] not include all the apps that have OP_REQUEST_INSTALL_PACKAGES granted

Due to a recent change in AppOpsService, apps that share system_uid have all the appops granted. However, we don't want them to be listed under "Install unknown apps" if they don't explicitly declare the permission usage of REQUEST_INSTALL_PACKAGES in their manifest. This CL fixes that.

Change-Id: I025bc17c335093ae5d3b15a3bef67d659c8f790f
BUG: 338066634
BUG: 336677341
FIXES: 338066634
Test: manual by checking the Settings page
parent d6941aff
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -94,9 +94,7 @@ class InstallUnknownAppsListModel(private val context: Context) :
        private fun isChangeable(
            record: InstallUnknownAppsRecord,
            potentialPackageNames: Set<String>,
        ) =
            record.appOpsController.getMode() != MODE_DEFAULT ||
                record.app.packageName in potentialPackageNames
        ) = record.app.packageName in potentialPackageNames

        private fun getPotentialPackageNames(userId: Int): Set<String> =
            AppGlobals.getPackageManager()