Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69c5220b authored by Tony Mak's avatar Tony Mak Committed by android-build-merger
Browse files

We should show custom title for suspend app dialog am: 706fbe7e

am: d3beaa57

Change-Id: Ie91198e54c738988ea00712c02f1a6f7dd7fa1dc
parents 1c471f00 d3beaa57
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1172,6 +1172,13 @@ public class DevicePolicyManager {
     */
    public static final String POLICY_MANDATORY_BACKUPS = "policy_mandatory_backups";

    /**
     * Constant to indicate the feature of suspending app. Use it as the value of
     * {@link #EXTRA_RESTRICTION}.
     * @hide
     */
    public static final String POLICY_SUSPEND_PACKAGES = "policy_suspend_packages";

    /**
     * A String indicating a specific restricted feature. Can be a user restriction from the
     * {@link UserManager}, e.g. {@link UserManager#DISALLOW_ADJUST_VOLUME}, or one of the values
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import static android.app.ActivityOptions.ANIM_OPEN_CROSS_PROFILE_APPS;
import static android.app.PendingIntent.FLAG_CANCEL_CURRENT;
import static android.app.PendingIntent.FLAG_IMMUTABLE;
import static android.app.PendingIntent.FLAG_ONE_SHOT;
import static android.app.admin.DevicePolicyManager.EXTRA_RESTRICTION;
import static android.app.admin.DevicePolicyManager.POLICY_SUSPEND_PACKAGES;
import static android.content.Context.KEYGUARD_SERVICE;
import static android.content.Intent.EXTRA_INTENT;
import static android.content.Intent.EXTRA_PACKAGE_NAME;
@@ -213,6 +215,8 @@ class ActivityStartInterceptor {
            return false;
        }
        mIntent = devicePolicyManager.createShowAdminSupportIntent(mUserId, true);
        mIntent.putExtra(EXTRA_RESTRICTION, POLICY_SUSPEND_PACKAGES);

        mCallingPid = mRealCallingPid;
        mCallingUid = mRealCallingUid;
        mResolvedType = null;