From 72b662261cd71586577a5606ec8af13885cab08d Mon Sep 17 00:00:00 2001 From: Chandru Date: Wed, 28 Sep 2022 11:22:27 +0000 Subject: [PATCH] Fix lint errors in KeyguardUpdateMonitor. This makes it easier to navigate through the warnings in the file in AndroidStudio. If not, AS only cycles through these errors. Bug: 249467771 Test: atest KeyguardUpdateMonitorTest Change-Id: I6cd669ee1196a4639cee4e8c9748776b206bf3ca --- .../src/com/android/keyguard/KeyguardUpdateMonitor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 6eef3b33cf8f4..199a20832daf7 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -71,6 +71,7 @@ import android.annotation.AnyThread; import android.annotation.MainThread; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.app.ActivityManager; import android.app.ActivityTaskManager; import android.app.ActivityTaskManager.RootTaskInfo; @@ -867,6 +868,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } private Runnable mRetryFingerprintAuthentication = new Runnable() { + @SuppressLint("MissingPermission") @Override public void run() { mLogger.logRetryAfterFpHwUnavailable(mHardwareFingerprintUnavailableRetryCount); @@ -1692,7 +1694,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab * {@link com.android.internal.telephony.TelephonyIntents#ACTION_SIM_STATE_CHANGED} broadcast, * and then pass a result via our handler to {@link KeyguardUpdateMonitor#handleSimStateChange}, * we need a single object to pass to the handler. This class helps decode - * the intent and provide a {@link SimCard.State} result. + * the intent and provide a {@link SimData} result. */ private static class SimData { public int simState; @@ -2794,6 +2796,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return isUnlockWithFacePossible(userId) || isUnlockWithFingerprintPossible(userId); } + @SuppressLint("MissingPermission") @VisibleForTesting boolean isUnlockWithFingerprintPossible(int userId) { // TODO (b/242022358), make this rely on onEnrollmentChanged event and update it only once. @@ -3487,7 +3490,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab /** * If any SIM cards are currently secure. * - * @see #isSimPinSecure(State) + * @see #isSimPinSecure(int) */ public boolean isSimPinSecure() { // True if any SIM is pin secure @@ -3716,6 +3719,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mHandler.removeCallbacksAndMessages(null); } + @SuppressLint("MissingPermission") @Override public void dump(PrintWriter pw, String[] args) { pw.println("KeyguardUpdateMonitor state:");