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

Commit b60d47cc authored by Adrian Roos's avatar Adrian Roos
Browse files

Initilize LockPatternUtils with the current user

Prevents us from ending up with the wrong user in case
of SystemUI restarts.

Bug: 17343537
Change-Id: I40282380740f8b58adc72d24cb01d1018f07cfe7
parent 2dbf3eac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard;

import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.AlarmManager;
import android.app.PendingIntent;
@@ -487,7 +488,7 @@ public class KeyguardViewMediator extends SystemUI {
        mUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);

        mLockPatternUtils = new LockPatternUtils(mContext);
        mLockPatternUtils.setCurrentUser(UserHandle.USER_OWNER);
        mLockPatternUtils.setCurrentUser(ActivityManager.getCurrentUser());

        // Assume keyguard is showing (unless it's disabled) until we know for sure...
        mShowing = (mUpdateMonitor.isDeviceProvisioned() || mLockPatternUtils.isSecure())