Merge "Do not allow force stopping protected packages" into pi-dev

This commit is contained in:
Benjamin Franz
2018-03-26 09:15:41 +00:00
committed by Android (Google) Code Review
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);