[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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user