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

Commit 63f29d9d authored by Jason Monk's avatar Jason Monk
Browse files

Show lock to app request on all users

This way secondary users can see it.  To avoid it being displayed
on the wrong user, clear it on user switch.

Bug: 17151184
Change-Id: I1699f85d2d90cbc0e17f39f9971f20d90637b38f
parent c7f440dc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1819,6 +1819,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) {