Merge "Show device admin warning dialog if force stop is not allowed" into sc-dev am: dc07fe1ad1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15179293

Change-Id: Ia3fa8931d4278b870ff595d5fa613f58bca38261
This commit is contained in:
Rajeev Kumar
2021-07-04 19:48:23 +00:00
committed by Automerger Merge Worker

View File

@@ -272,6 +272,11 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
mMetricsFeatureProvider.action(
mActivity, SettingsEnums.ACTION_APP_INFO_FORCE_STOP);
// force stop
if (mPm.isPackageStateProtected(mAppEntry.info.packageName, mUserId)) {
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mActivity,
RestrictedLockUtilsInternal.getDeviceOwner(mActivity));
return;
}
if (mAppsControlDisallowedAdmin != null && !mAppsControlDisallowedBySystem) {
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(
mActivity, mAppsControlDisallowedAdmin);