Merge \"Disallow user to block notification from OobConfig\" into nyc-mr1-dev
am: 080f794b6e
Change-Id: Ia7a8bda97395cb403ba1db94cb9048e1f43ed9e8
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user