Merge "Do not allow force stopping protected packages" into pi-dev am: 396e91abf0

am: c81072f6ab

Change-Id: I03da3f59434e58936afb6646d393393a8899965e
This commit is contained in:
Benjamin Franz
2018-03-26 09:42:31 +00:00
committed by android-build-merger
2 changed files with 27 additions and 0 deletions

View File

@@ -283,6 +283,10 @@ public class AppActionButtonPreferenceController extends BasePreferenceControlle
// User can't force stop device admin.
Log.w(TAG, "User can't force stop device admin");
updateForceStopButton(false);
} else if (mPm.isPackageStateProtected(packageInfo.packageName,
UserHandle.getUserId(appEntry.info.uid))) {
Log.w(TAG, "User can't force stop protected packages");
updateForceStopButton(false);
} else if (AppUtils.isInstant(packageInfo.applicationInfo)) {
updateForceStopButton(false);
mActionButtons.setButton2Visible(false);