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

This commit is contained in:
Rajeev Kumar
2021-07-04 19:14:33 +00:00
committed by Android (Google) Code Review

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);