Disallow user to block notification from OobConfig
Change-Id: I4680e5c5b596e81ac33d544d0d81de9df3b7587c Fix: 29632126
This commit is contained in:
@@ -184,7 +184,7 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
// by not allowing disabling of apps signed with the
|
// by not allowing disabling of apps signed with the
|
||||||
// system cert and any launcher app in the system.
|
// system cert and any launcher app in the system.
|
||||||
if (mHomePackages.contains(mAppEntry.info.packageName)
|
if (mHomePackages.contains(mAppEntry.info.packageName)
|
||||||
|| Utils.isSystemPackage(mPm, mPackageInfo)) {
|
|| Utils.isSystemPackage(getContext().getResources(), mPm, mPackageInfo)) {
|
||||||
// Disable button for core system applications.
|
// Disable button for core system applications.
|
||||||
button.setText(R.string.disable_text);
|
button.setText(R.string.disable_text);
|
||||||
} else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) {
|
} else if (mAppEntry.info.enabled && !isDisabledUntilUsed()) {
|
||||||
@@ -231,7 +231,7 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow uninstalling the device provisioning package.
|
// Don't allow uninstalling the device provisioning package.
|
||||||
if (isDeviceProvisioningPackage(mAppEntry.info.packageName)) {
|
if (Utils.isDeviceProvisioningPackage(getResources(), mAppEntry.info.packageName)) {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,16 +302,6 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
return false;
|
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. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
|
@@ -59,7 +59,7 @@ public class NotificationBackend {
|
|||||||
|
|
||||||
public AppRow loadAppRow(Context context, PackageManager pm, PackageInfo app) {
|
public AppRow loadAppRow(Context context, PackageManager pm, PackageInfo app) {
|
||||||
final AppRow row = loadAppRow(context, pm, app.applicationInfo);
|
final AppRow row = loadAppRow(context, pm, app.applicationInfo);
|
||||||
row.systemApp = Utils.isSystemPackage(pm, app);
|
row.systemApp = Utils.isSystemPackage(context.getResources(), pm, app);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user