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

Commit 1889c5c3 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Show lock to app request on all users" into lmp-dev

parents 88180d26 63f29d9d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1841,6 +1841,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                        BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_START,
                        Integer.toString(msg.arg1), msg.arg1);
                mSystemServiceManager.switchUser(msg.arg1);
                mLockToAppRequest.clearPrompt();
                break;
            }
            case ENTER_ANIMATION_COMPLETE_MSG: {
+7 −1
Original line number Diff line number Diff line
@@ -74,11 +74,15 @@ public class LockToAppRequestDialog implements OnClickListener {
        return 0;
    }

    public void showLockTaskPrompt(TaskRecord task) {
    public void clearPrompt() {
        if (mDialog != null) {
            mDialog.dismiss();
            mDialog = null;
        }
    }

    public void showLockTaskPrompt(TaskRecord task) {
        clearPrompt();
        mRequestedTask = task;
        final int unlockStringId = getLockString(task.userId);

@@ -97,6 +101,8 @@ public class LockToAppRequestDialog implements OnClickListener {
        mDialog = builder.create();

        mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        mDialog.getWindow().getAttributes().privateFlags |=
                WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        mDialog.show();

        if (unlockStringId != 0) {