diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index d374f6bc3ad..f3d5f516fa1 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -184,7 +184,7 @@ public class InstalledAppDetails extends AppInfoBase // by not allowing disabling of apps signed with the // system cert and any launcher app in the system. if (mHomePackages.contains(mAppEntry.info.packageName) - || Utils.isSystemPackage(mPm, mPackageInfo)) { + || Utils.isSystemPackage(getContext().getResources(), mPm, mPackageInfo)) { // Disable button for core system applications. button.setText(R.string.disable_text); } else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) { @@ -231,7 +231,7 @@ public class InstalledAppDetails extends AppInfoBase } // Don't allow uninstalling the device provisioning package. - if (isDeviceProvisioningPackage(mAppEntry.info.packageName)) { + if (Utils.isDeviceProvisioningPackage(getResources(), mAppEntry.info.packageName)) { enabled = false; } @@ -302,16 +302,6 @@ public class InstalledAppDetails extends AppInfoBase return false; } - /** - * Returns {@code true} if the supplied package is the device provisioning app. Otherwise, - * returns {@code false}. - */ - private boolean isDeviceProvisioningPackage(String packageName) { - String deviceProvisioningPackage = getResources().getString( - com.android.internal.R.string.config_deviceProvisioningPackage); - return deviceProvisioningPackage != null && deviceProvisioningPackage.equals(packageName); - } - /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { diff --git a/src/com/android/settings/notification/NotificationBackend.java b/src/com/android/settings/notification/NotificationBackend.java index 9b05da4018c..944a1f2cfc9 100644 --- a/src/com/android/settings/notification/NotificationBackend.java +++ b/src/com/android/settings/notification/NotificationBackend.java @@ -59,7 +59,7 @@ public class NotificationBackend { public AppRow loadAppRow(Context context, PackageManager pm, PackageInfo app) { final AppRow row = loadAppRow(context, pm, app.applicationInfo); - row.systemApp = Utils.isSystemPackage(pm, app); + row.systemApp = Utils.isSystemPackage(context.getResources(), pm, app); return row; }