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

Commit f035be5c authored by Daniel Hillenbrand's avatar Daniel Hillenbrand Committed by Gerrit Code Review
Browse files

Merge "Framework: Add missing part of 'Lock before unlock'" into jellybean

parents d8c36143 09881f2e
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -16,16 +16,6 @@

package com.android.internal.policy.impl;

import com.android.internal.R;
import com.android.internal.policy.impl.KeyguardUpdateMonitor.InfoCallback;
import com.android.internal.policy.impl.KeyguardUpdateMonitor.InfoCallbackImpl;
import com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockScreenWidgetCallback;
import com.android.internal.widget.LockScreenWidgetInterface;
import com.android.internal.widget.TransportControlView;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
@@ -40,16 +30,15 @@ import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -60,6 +49,13 @@ import android.view.View;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;

import com.android.internal.R;
import com.android.internal.policy.impl.KeyguardUpdateMonitor.InfoCallbackImpl;
import com.android.internal.telephony.IccCard;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockScreenWidgetCallback;
import com.android.internal.widget.TransportControlView;

import java.io.IOException;


@@ -683,7 +679,9 @@ public class LockPatternKeyguardView extends KeyguardViewBase {

    protected void onConfigurationChanged(Configuration newConfig) {
        Resources resources = getResources();
        mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen);
        mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
                        (Settings.Secure.getInt(mContext.getContentResolver(),
                        Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);
        mConfiguration = newConfig;
        if (DEBUG_CONFIGURATION) Log.v(TAG, "**** re-creating lock screen since config changed");
        saveWidgetState();
@@ -1045,6 +1043,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
     */
    private Mode getInitialMode() {
        final IccCard.State simState = mUpdateMonitor.getSimState();

        mShowLockBeforeUnlock = mContext.getResources().getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
                        (Settings.Secure.getInt(mContext.getContentResolver(),
                        Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);

        if (stuckOnLockScreenBecauseSimMissing() ||
                (simState == IccCard.State.PUK_REQUIRED &&
                        !mLockPatternUtils.isPukUnlockScreenEnable())) {