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

Commit 859b3002 authored by Adnan Begovic's avatar Adnan Begovic Committed by Steve Kondik
Browse files

Keyguard: Don't disable visibility when scrambling pin.

  Otherwise the first numbers text is flipped to invisible
  even though it shouldn't be.

Change-Id: Ia2b80d594e7f11af7a60a85bdb4ea9909d0ac20b
parent f8898a86
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.TypedArray;
import android.os.PowerManager;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.SystemClock;
import android.provider.Settings;
import android.util.AttributeSet;
import android.util.AttributeSet;
import android.view.HapticFeedbackConstants;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
@@ -119,6 +120,8 @@ public class NumPadKey extends ViewGroup {
    }
    }


    private void updateText() {
    private void updateText() {
        boolean scramblePin = (Settings.System.getInt(getContext().getContentResolver(),
                Settings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0) == 1);
        if (mDigit >= 0) {
        if (mDigit >= 0) {
            mDigitText.setText(Integer.toString(mDigit));
            mDigitText.setText(Integer.toString(mDigit));
            if (sKlondike == null) {
            if (sKlondike == null) {
@@ -127,7 +130,7 @@ public class NumPadKey extends ViewGroup {
            if (sKlondike != null && sKlondike.length > mDigit) {
            if (sKlondike != null && sKlondike.length > mDigit) {
                String klondike = sKlondike[mDigit];
                String klondike = sKlondike[mDigit];
                final int len = klondike.length();
                final int len = klondike.length();
                if (len > 0) {
                if (len > 0  && !scramblePin) {
                    mKlondikeText.setText(klondike);
                    mKlondikeText.setText(klondike);
                } else {
                } else {
                    mKlondikeText.setVisibility(View.INVISIBLE);
                    mKlondikeText.setVisibility(View.INVISIBLE);