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

Commit b258659a authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix 2428368: Fix most of the lockscreen orientation refresh bugs"

parents 4f096dcf a027c95e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import java.util.List;
public class LockPatternUtils {

    private static final String TAG = "LockPatternUtils";
    private static final boolean LDEBUG = false;

    private static final String LOCK_PATTERN_FILE = "/system/gesture.key";
    private static final String LOCK_PASSWORD_FILE = "/system/password.key";
@@ -126,7 +127,6 @@ public class LockPatternUtils {
    public LockPatternUtils(Context context) {
        mContext = context;
        mContentResolver = context.getContentResolver();
        mDevicePolicyManager = getDevicePolicyManager();
        // Initialize the location of gesture lock file
        if (sLockPatternFilename == null) {
            sLockPatternFilename = android.os.Environment.getDataDirectory()
+5 −26
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.policy.impl;

import android.content.Context;
import com.android.internal.telephony.IccCard;
import android.content.res.Configuration;
import android.test.AndroidTestCase;
import android.view.View;
import android.view.KeyEvent;
@@ -39,8 +40,6 @@ public class LockPatternKeyguardViewTest extends AndroidTestCase {
    private static class MockUpdateMonitor extends KeyguardUpdateMonitor {

        public IccCard.State simState = IccCard.State.READY;
        public boolean inPortrait = false;
        public boolean keyboardOpen = false;

        private MockUpdateMonitor(Context context) {
            super(context);
@@ -50,26 +49,6 @@ public class LockPatternKeyguardViewTest extends AndroidTestCase {
        public IccCard.State getSimState() {
            return simState;
        }

        @Override
        public boolean isInPortrait() {
            return inPortrait;
        }

        @Override
        public boolean isKeyboardOpen() {
            return keyboardOpen;
        }

        @Override
        boolean queryInPortrait() {
            return inPortrait;
        }

        @Override
        boolean queryKeyboardOpen() {
            return keyboardOpen;
        }
    }

    private static class MockLockPatternUtils extends LockPatternUtils {
@@ -317,7 +296,7 @@ public class LockPatternKeyguardViewTest extends AndroidTestCase {
        assertEquals(1, lockScreen.getOnResumeCount());

        // simulate screen asking to be recreated
        mLPKV.mKeyguardScreenCallback.recreateMe();
        mLPKV.mKeyguardScreenCallback.recreateMe(new Configuration());

        // should have been recreated
        assertEquals(2, mLPKV.getInjectedLockScreens().size());