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

Commit 65e19b29 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Allow biometric messages to show in sequence" into tm-qpr-dev am: b36b1d2e

parents 2ccb8d94 b36b1d2e
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -799,7 +799,7 @@
    <!-- Message shown when lock screen is tapped or face authentication fails. [CHAR LIMIT=60] -->
    <!-- Message shown when lock screen is tapped or face authentication fails. [CHAR LIMIT=60] -->
    <string name="keyguard_unlock">Swipe up to open</string>
    <string name="keyguard_unlock">Swipe up to open</string>


    <!-- Message shown when lock screen is unlocked (ie: by trust agent) and the user taps the empty space on the lock screen and UDFPS is supported. Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
    <!-- Message shown when lock screen is unlocked (ie: by trust agent or face auth). Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
    <string name="keyguard_unlock_press">Press the unlock icon to open</string>
    <string name="keyguard_unlock_press">Press the unlock icon to open</string>


    <!-- Message shown when non-bypass face authentication succeeds. Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
    <!-- Message shown when non-bypass face authentication succeeds. Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
@@ -813,6 +813,10 @@
    <!-- Message shown when non-bypass face authentication succeeds and UDFPS is supported. Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
    <!-- Message shown when non-bypass face authentication succeeds and UDFPS is supported. Provides extra instructions for how the user can enter their device [CHAR LIMIT=60] -->
    <string name="keyguard_face_successful_unlock_press_alt_3">Face recognized. Press the unlock icon to open.</string>
    <string name="keyguard_face_successful_unlock_press_alt_3">Face recognized. Press the unlock icon to open.</string>


    <!-- Message shown when non-bypass face authentication succeeds. [CHAR LIMIT=60] -->
    <string name="keyguard_face_successful_unlock">Unlocked by face</string>
    <!-- Message shown when non-bypass face authentication succeeds. [CHAR LIMIT=60] -->
    <string name="keyguard_face_successful_unlock_alt1">Face recognized</string>


    <!-- Messages shown when users press outside of udfps region during -->
    <!-- Messages shown when users press outside of udfps region during -->
    <string-array name="udfps_accessibility_touch_hints">
    <string-array name="udfps_accessibility_touch_hints">
+1 −1
Original line number Original line Diff line number Diff line
@@ -271,7 +271,7 @@ public class KeyguardUpdateMonitorCallback {
     * like fingerprint authentication errors.
     * like fingerprint authentication errors.
     *
     *
     * @param message Message that indicates an error.
     * @param message Message that indicates an error.
     * @see KeyguardIndicationController.BaseKeyguardCallback#HIDE_DELAY_MS
     * @see KeyguardIndicationController#DEFAULT_HIDE_DELAY_MS
     * @see KeyguardIndicationController#showTransientIndication(CharSequence)
     * @see KeyguardIndicationController#showTransientIndication(CharSequence)
     */
     */
    public void onTrustAgentErrorMessage(CharSequence message) { }
    public void onTrustAgentErrorMessage(CharSequence message) { }
+9 −3
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.annotation.IntDef;
import com.android.systemui.Dumpable;
import com.android.systemui.Dumpable;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.KeyguardIndicationController;
import com.android.systemui.statusbar.phone.KeyguardIndicationTextView;
import com.android.systemui.statusbar.phone.KeyguardIndicationTextView;
import com.android.systemui.util.ViewController;
import com.android.systemui.util.ViewController;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.DelayableExecutor;
@@ -56,8 +57,11 @@ import java.util.Map;
public class KeyguardIndicationRotateTextViewController extends
public class KeyguardIndicationRotateTextViewController extends
        ViewController<KeyguardIndicationTextView> implements Dumpable {
        ViewController<KeyguardIndicationTextView> implements Dumpable {
    public static String TAG = "KgIndicationRotatingCtrl";
    public static String TAG = "KgIndicationRotatingCtrl";
    private static final long DEFAULT_INDICATION_SHOW_LENGTH = 3500; // milliseconds
    private static final long DEFAULT_INDICATION_SHOW_LENGTH =
    public static final long IMPORTANT_MSG_MIN_DURATION = 2000L + 600L; // 2000ms + [Y in duration]
            KeyguardIndicationController.DEFAULT_HIDE_DELAY_MS
                    - KeyguardIndicationTextView.Y_IN_DURATION;
    public static final long IMPORTANT_MSG_MIN_DURATION =
            2000L + KeyguardIndicationTextView.Y_IN_DURATION;


    private final StatusBarStateController mStatusBarStateController;
    private final StatusBarStateController mStatusBarStateController;
    private final float mMaxAlpha;
    private final float mMaxAlpha;
@@ -375,6 +379,7 @@ public class KeyguardIndicationRotateTextViewController extends
    public static final int INDICATION_TYPE_USER_LOCKED = 8;
    public static final int INDICATION_TYPE_USER_LOCKED = 8;
    public static final int INDICATION_TYPE_REVERSE_CHARGING = 10;
    public static final int INDICATION_TYPE_REVERSE_CHARGING = 10;
    public static final int INDICATION_TYPE_BIOMETRIC_MESSAGE = 11;
    public static final int INDICATION_TYPE_BIOMETRIC_MESSAGE = 11;
    public static final int INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP = 12;


    @IntDef({
    @IntDef({
            INDICATION_TYPE_NONE,
            INDICATION_TYPE_NONE,
@@ -388,7 +393,8 @@ public class KeyguardIndicationRotateTextViewController extends
            INDICATION_TYPE_RESTING,
            INDICATION_TYPE_RESTING,
            INDICATION_TYPE_USER_LOCKED,
            INDICATION_TYPE_USER_LOCKED,
            INDICATION_TYPE_REVERSE_CHARGING,
            INDICATION_TYPE_REVERSE_CHARGING,
            INDICATION_TYPE_BIOMETRIC_MESSAGE
            INDICATION_TYPE_BIOMETRIC_MESSAGE,
            INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP
    })
    })
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface IndicationType{}
    public @interface IndicationType{}
+60 −33
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewCont
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_ALIGNMENT;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_ALIGNMENT;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BATTERY;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BATTERY;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BIOMETRIC_MESSAGE;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BIOMETRIC_MESSAGE;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_DISCLOSURE;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_DISCLOSURE;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_LOGOUT;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_LOGOUT;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_OWNER_INFO;
import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_OWNER_INFO;
@@ -36,7 +37,6 @@ import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewCont
import static com.android.systemui.keyguard.ScreenLifecycle.SCREEN_ON;
import static com.android.systemui.keyguard.ScreenLifecycle.SCREEN_ON;
import static com.android.systemui.plugins.FalsingManager.LOW_PENALTY;
import static com.android.systemui.plugins.FalsingManager.LOW_PENALTY;


import android.app.IActivityManager;
import android.app.admin.DevicePolicyManager;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Context;
@@ -123,6 +123,8 @@ public class KeyguardIndicationController {
    private static final int MSG_SHOW_ACTION_TO_UNLOCK = 2;
    private static final int MSG_SHOW_ACTION_TO_UNLOCK = 2;
    private static final int MSG_HIDE_BIOMETRIC_MESSAGE = 3;
    private static final int MSG_HIDE_BIOMETRIC_MESSAGE = 3;
    private static final long TRANSIENT_BIOMETRIC_ERROR_TIMEOUT = 1300;
    private static final long TRANSIENT_BIOMETRIC_ERROR_TIMEOUT = 1300;
    public static final long DEFAULT_HIDE_DELAY_MS =
            3500 + KeyguardIndicationTextView.Y_IN_DURATION;


    private final Context mContext;
    private final Context mContext;
    private final BroadcastDispatcher mBroadcastDispatcher;
    private final BroadcastDispatcher mBroadcastDispatcher;
@@ -140,7 +142,6 @@ public class KeyguardIndicationController {
    protected final @Main DelayableExecutor mExecutor;
    protected final @Main DelayableExecutor mExecutor;
    protected final @Background DelayableExecutor mBackgroundExecutor;
    protected final @Background DelayableExecutor mBackgroundExecutor;
    private final LockPatternUtils mLockPatternUtils;
    private final LockPatternUtils mLockPatternUtils;
    private final IActivityManager mIActivityManager;
    private final FalsingManager mFalsingManager;
    private final FalsingManager mFalsingManager;
    private final KeyguardBypassController mKeyguardBypassController;
    private final KeyguardBypassController mKeyguardBypassController;
    private final AccessibilityManager mAccessibilityManager;
    private final AccessibilityManager mAccessibilityManager;
@@ -155,6 +156,7 @@ public class KeyguardIndicationController {
    private CharSequence mTrustGrantedIndication;
    private CharSequence mTrustGrantedIndication;
    private CharSequence mTransientIndication;
    private CharSequence mTransientIndication;
    private CharSequence mBiometricMessage;
    private CharSequence mBiometricMessage;
    private CharSequence mBiometricMessageFollowUp;
    protected ColorStateList mInitialTextColorState;
    protected ColorStateList mInitialTextColorState;
    private boolean mVisible;
    private boolean mVisible;
    private boolean mOrganizationOwnedDevice;
    private boolean mOrganizationOwnedDevice;
@@ -171,7 +173,7 @@ public class KeyguardIndicationController {
    private int mBatteryLevel;
    private int mBatteryLevel;
    private boolean mBatteryPresent = true;
    private boolean mBatteryPresent = true;
    private long mChargingTimeRemaining;
    private long mChargingTimeRemaining;
    private String mMessageToShowOnScreenOn;
    private String mBiometricErrorMessageToShowOnScreenOn;
    private final Set<Integer> mCoExFaceHelpMsgIdsToShow;
    private final Set<Integer> mCoExFaceHelpMsgIdsToShow;
    private boolean mInited;
    private boolean mInited;


@@ -189,11 +191,11 @@ public class KeyguardIndicationController {
    private final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() {
    private final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() {
        @Override
        @Override
        public void onScreenTurnedOn() {
        public void onScreenTurnedOn() {
            if (mMessageToShowOnScreenOn != null) {
            if (mBiometricErrorMessageToShowOnScreenOn != null) {
                showBiometricMessage(mMessageToShowOnScreenOn);
                showBiometricMessage(mBiometricErrorMessageToShowOnScreenOn);
                // We want to keep this message around in case the screen was off
                // We want to keep this message around in case the screen was off
                hideBiometricMessageDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);
                hideBiometricMessageDelayed(DEFAULT_HIDE_DELAY_MS);
                mMessageToShowOnScreenOn = null;
                mBiometricErrorMessageToShowOnScreenOn = null;
            }
            }
        }
        }
    };
    };
@@ -219,7 +221,6 @@ public class KeyguardIndicationController {
            FalsingManager falsingManager,
            FalsingManager falsingManager,
            LockPatternUtils lockPatternUtils,
            LockPatternUtils lockPatternUtils,
            ScreenLifecycle screenLifecycle,
            ScreenLifecycle screenLifecycle,
            IActivityManager iActivityManager,
            KeyguardBypassController keyguardBypassController,
            KeyguardBypassController keyguardBypassController,
            AccessibilityManager accessibilityManager) {
            AccessibilityManager accessibilityManager) {
        mContext = context;
        mContext = context;
@@ -236,7 +237,6 @@ public class KeyguardIndicationController {
        mExecutor = executor;
        mExecutor = executor;
        mBackgroundExecutor = bgExecutor;
        mBackgroundExecutor = bgExecutor;
        mLockPatternUtils = lockPatternUtils;
        mLockPatternUtils = lockPatternUtils;
        mIActivityManager = iActivityManager;
        mFalsingManager = falsingManager;
        mFalsingManager = falsingManager;
        mKeyguardBypassController = keyguardBypassController;
        mKeyguardBypassController = keyguardBypassController;
        mAccessibilityManager = accessibilityManager;
        mAccessibilityManager = accessibilityManager;
@@ -498,8 +498,23 @@ public class KeyguardIndicationController {
                            .build(),
                            .build(),
                    true
                    true
            );
            );
            if (!TextUtils.isEmpty(mBiometricMessageFollowUp)) {
                mRotateTextViewController.updateIndication(
                        INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP,
                        new KeyguardIndication.Builder()
                                .setMessage(mBiometricMessageFollowUp)
                                .setMinVisibilityMillis(IMPORTANT_MSG_MIN_DURATION)
                                .setTextColor(mInitialTextColorState)
                                .build(),
                        true
                );
            } else {
                mRotateTextViewController.hideIndication(
                        INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP);
            }
        } else {
        } else {
            mRotateTextViewController.hideIndication(INDICATION_TYPE_BIOMETRIC_MESSAGE);
            mRotateTextViewController.hideIndication(INDICATION_TYPE_BIOMETRIC_MESSAGE);
            mRotateTextViewController.hideIndication(INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP);
        }
        }
    }
    }


@@ -719,38 +734,45 @@ public class KeyguardIndicationController {
    private void showTransientIndication(CharSequence transientIndication) {
    private void showTransientIndication(CharSequence transientIndication) {
        mTransientIndication = transientIndication;
        mTransientIndication = transientIndication;
        mHandler.removeMessages(MSG_HIDE_TRANSIENT);
        mHandler.removeMessages(MSG_HIDE_TRANSIENT);
        hideTransientIndicationDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);
        hideTransientIndicationDelayed(DEFAULT_HIDE_DELAY_MS);


        updateTransient();
        updateTransient();
    }
    }


    /**
    private void showBiometricMessage(CharSequence biometricMessage) {
     * Shows {@param biometricMessage} until it is hidden by {@link #hideBiometricMessage}.
        showBiometricMessage(biometricMessage, null);
     */
    public void showBiometricMessage(int biometricMessage) {
        showBiometricMessage(mContext.getResources().getString(biometricMessage));
    }
    }


    /**
    /**
     * Shows {@param biometricMessage} until it is hidden by {@link #hideBiometricMessage}.
     * Shows {@param biometricMessage} and {@param biometricMessageFollowUp}
     * until they are hidden by {@link #hideBiometricMessage}. Messages are rotated through
     * by {@link KeyguardIndicationRotateTextViewController}, see class for rotating message
     * logic.
     */
     */
    private void showBiometricMessage(CharSequence biometricMessage) {
    private void showBiometricMessage(CharSequence biometricMessage,
            CharSequence biometricMessageFollowUp) {
        if (TextUtils.equals(biometricMessage, mBiometricMessage)) {
        if (TextUtils.equals(biometricMessage, mBiometricMessage)) {
            return;
            return;
        }
        }


        mBiometricMessage = biometricMessage;
        mBiometricMessage = biometricMessage;
        mBiometricMessageFollowUp = biometricMessageFollowUp;


        mHandler.removeMessages(MSG_SHOW_ACTION_TO_UNLOCK);
        mHandler.removeMessages(MSG_SHOW_ACTION_TO_UNLOCK);
        mHandler.removeMessages(MSG_HIDE_BIOMETRIC_MESSAGE);
        mHandler.removeMessages(MSG_HIDE_BIOMETRIC_MESSAGE);
        hideBiometricMessageDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);
        hideBiometricMessageDelayed(
                mBiometricMessageFollowUp != null
                        ? DEFAULT_HIDE_DELAY_MS * 2
                        : DEFAULT_HIDE_DELAY_MS
        );


        updateBiometricMessage();
        updateBiometricMessage();
    }
    }


    private void hideBiometricMessage() {
    private void hideBiometricMessage() {
        if (mBiometricMessage != null) {
        if (mBiometricMessage != null || mBiometricMessageFollowUp != null) {
            mBiometricMessage = null;
            mBiometricMessage = null;
            mBiometricMessageFollowUp = null;
            mHandler.removeMessages(MSG_HIDE_BIOMETRIC_MESSAGE);
            mHandler.removeMessages(MSG_HIDE_BIOMETRIC_MESSAGE);
            updateBiometricMessage();
            updateBiometricMessage();
        }
        }
@@ -789,9 +811,9 @@ public class KeyguardIndicationController {
            // colors can be hard to read in low brightness.
            // colors can be hard to read in low brightness.
            mTopIndicationView.setTextColor(Color.WHITE);
            mTopIndicationView.setTextColor(Color.WHITE);


            CharSequence newIndication = null;
            CharSequence newIndication;
            if (!TextUtils.isEmpty(mBiometricMessage)) {
            if (!TextUtils.isEmpty(mBiometricMessage)) {
                newIndication = mBiometricMessage;
                newIndication = mBiometricMessage; // note: doesn't show mBiometricMessageFollowUp
            } else if (!TextUtils.isEmpty(mTransientIndication)) {
            } else if (!TextUtils.isEmpty(mTransientIndication)) {
                newIndication = mTransientIndication;
                newIndication = mTransientIndication;
            } else if (!mBatteryPresent) {
            } else if (!mBatteryPresent) {
@@ -909,15 +931,21 @@ public class KeyguardIndicationController {
                        || mAccessibilityManager.isTouchExplorationEnabled();
                        || mAccessibilityManager.isTouchExplorationEnabled();
                if (udfpsSupported && faceAuthenticated) { // co-ex
                if (udfpsSupported && faceAuthenticated) { // co-ex
                    if (a11yEnabled) {
                    if (a11yEnabled) {
                        showBiometricMessage(mContext.getString(
                        showBiometricMessage(
                                R.string.keyguard_face_successful_unlock_swipe));
                                mContext.getString(R.string.keyguard_face_successful_unlock),
                                mContext.getString(R.string.keyguard_unlock)
                        );
                    } else {
                    } else {
                        showBiometricMessage(mContext.getString(
                        showBiometricMessage(
                                R.string.keyguard_face_successful_unlock_press));
                                mContext.getString(R.string.keyguard_face_successful_unlock),
                                mContext.getString(R.string.keyguard_unlock_press)
                        );
                    }
                    }
                } else if (faceAuthenticated) { // face-only
                } else if (faceAuthenticated) { // face-only
                    showBiometricMessage(mContext.getString(
                    showBiometricMessage(
                            R.string.keyguard_face_successful_unlock_swipe));
                            mContext.getString(R.string.keyguard_face_successful_unlock),
                            mContext.getString(R.string.keyguard_unlock)
                    );
                } else if (udfpsSupported) { // udfps-only
                } else if (udfpsSupported) { // udfps-only
                    if (a11yEnabled) {
                    if (a11yEnabled) {
                        showBiometricMessage(mContext.getString(R.string.keyguard_unlock));
                        showBiometricMessage(mContext.getString(R.string.keyguard_unlock));
@@ -943,10 +971,11 @@ public class KeyguardIndicationController {
        pw.println("  mPowerCharged: " + mPowerCharged);
        pw.println("  mPowerCharged: " + mPowerCharged);
        pw.println("  mChargingSpeed: " + mChargingSpeed);
        pw.println("  mChargingSpeed: " + mChargingSpeed);
        pw.println("  mChargingWattage: " + mChargingWattage);
        pw.println("  mChargingWattage: " + mChargingWattage);
        pw.println("  mMessageToShowOnScreenOn: " + mMessageToShowOnScreenOn);
        pw.println("  mMessageToShowOnScreenOn: " + mBiometricErrorMessageToShowOnScreenOn);
        pw.println("  mDozing: " + mDozing);
        pw.println("  mDozing: " + mDozing);
        pw.println("  mTransientIndication: " + mTransientIndication);
        pw.println("  mTransientIndication: " + mTransientIndication);
        pw.println("  mBiometricMessage: " + mBiometricMessage);
        pw.println("  mBiometricMessage: " + mBiometricMessage);
        pw.println("  mBiometricMessageFollowUp: " + mBiometricMessageFollowUp);
        pw.println("  mBatteryLevel: " + mBatteryLevel);
        pw.println("  mBatteryLevel: " + mBatteryLevel);
        pw.println("  mBatteryPresent: " + mBatteryPresent);
        pw.println("  mBatteryPresent: " + mBatteryPresent);
        pw.println("  AOD text: " + (
        pw.println("  AOD text: " + (
@@ -958,8 +987,6 @@ public class KeyguardIndicationController {
    }
    }


    protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback {
    protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback {
        public static final int HIDE_DELAY_MS = 5000;

        @Override
        @Override
        public void onTimeChanged() {
        public void onTimeChanged() {
            if (mVisible) {
            if (mVisible) {
@@ -1077,7 +1104,7 @@ public class KeyguardIndicationController {
            } else if (mScreenLifecycle.getScreenState() == SCREEN_ON) {
            } else if (mScreenLifecycle.getScreenState() == SCREEN_ON) {
                showBiometricMessage(errString);
                showBiometricMessage(errString);
            } else {
            } else {
                mMessageToShowOnScreenOn = errString;
                mBiometricErrorMessageToShowOnScreenOn = errString;
            }
            }
        }
        }


@@ -1139,7 +1166,7 @@ public class KeyguardIndicationController {
                // Let's hide any previous messages when authentication starts, otherwise
                // Let's hide any previous messages when authentication starts, otherwise
                // multiple auth attempts would overlap.
                // multiple auth attempts would overlap.
                hideBiometricMessage();
                hideBiometricMessage();
                mMessageToShowOnScreenOn = null;
                mBiometricErrorMessageToShowOnScreenOn = null;
            }
            }
        }
        }


@@ -1179,7 +1206,7 @@ public class KeyguardIndicationController {
        @Override
        @Override
        public void onRequireUnlockForNfc() {
        public void onRequireUnlockForNfc() {
            showTransientIndication(mContext.getString(R.string.require_unlock_for_nfc));
            showTransientIndication(mContext.getString(R.string.require_unlock_for_nfc));
            hideTransientIndicationDelayed(HIDE_DELAY_MS);
            hideTransientIndicationDelayed(DEFAULT_HIDE_DELAY_MS);
        }
        }
    }
    }


+3 −1
Original line number Original line Diff line number Diff line
@@ -39,6 +39,8 @@ import com.android.systemui.keyguard.KeyguardIndication;
 * A view to show hints on Keyguard ("Swipe up to unlock", "Tap again to open").
 * A view to show hints on Keyguard ("Swipe up to unlock", "Tap again to open").
 */
 */
public class KeyguardIndicationTextView extends TextView {
public class KeyguardIndicationTextView extends TextView {
    public static final long Y_IN_DURATION = 600L;

    @StyleRes
    @StyleRes
    private static int sStyleId = R.style.TextAppearance_Keyguard_BottomArea;
    private static int sStyleId = R.style.TextAppearance_Keyguard_BottomArea;
    @StyleRes
    @StyleRes
@@ -259,7 +261,7 @@ public class KeyguardIndicationTextView extends TextView {


    private long getYInDuration() {
    private long getYInDuration() {
        if (!mAnimationsEnabled) return 0L;
        if (!mAnimationsEnabled) return 0L;
        return 600L;
        return Y_IN_DURATION;
    }
    }


    private long getFadeOutDuration() {
    private long getFadeOutDuration() {
Loading