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

Commit 706fbe7e authored by Tony Mak's avatar Tony Mak
Browse files

We should show custom title for suspend app dialog

BUG: 77523074

Test: Suspend an app, observe the new title.

Change-Id: I85f3d47e05332f7593a885130fd30dc5fd0a9960
parent b2e6e45d
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;
@@ -214,6 +216,8 @@ class ActivityStartInterceptor {
            return false;
        }
        mIntent = devicePolicyManager.createShowAdminSupportIntent(mUserId, true);
        mIntent.putExtra(EXTRA_RESTRICTION, POLICY_SUSPEND_PACKAGES);

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