Use permissionController name rather than hardcode

soong renames the package name in the resource table, so it no longer
needs to be accessed based on the base package name.

Test: forrest
Bug: 147434671
Change-Id: I5b5b6699f720ad8798d36467e88c8d8ddb52c9ee
This commit is contained in:
Liz Kammer
2020-06-01 17:47:46 +00:00
parent 841ddf9dd2
commit f0cc376617

View File

@@ -139,10 +139,6 @@ public class ApplicationPackageManager extends PackageManager {
public static final String APP_PERMISSION_BUTTON_ALLOW_ALWAYS =
"app_permission_button_allow_always";
// Name of the package which the permission controller's resources are in.
public static final String PERMISSION_CONTROLLER_RESOURCE_PACKAGE =
"com.android.permissioncontroller";
private final Object mLock = new Object();
@GuardedBy("mLock")
@@ -897,7 +893,7 @@ public class ApplicationPackageManager extends PackageManager {
mContext.createPackageContext(permissionController, 0);
int textId = context.getResources().getIdentifier(APP_PERMISSION_BUTTON_ALLOW_ALWAYS,
"string", PERMISSION_CONTROLLER_RESOURCE_PACKAGE);
"string", permissionController);
if (textId != 0) {
return context.getText(textId);
}