Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -2325,6 +2325,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mUserFaceAuthenticated.clear(); mTrustManager.clearAllBiometricRecognized(BiometricSourceType.FINGERPRINT); mTrustManager.clearAllBiometricRecognized(BiometricSourceType.FACE); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onBiometricsCleared(); } } } public boolean isSimPinVoiceSecure() { Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +5 −0 Original line number Diff line number Diff line Loading @@ -314,4 +314,9 @@ public class KeyguardUpdateMonitorCallback { */ public void onLogoutEnabledChanged() { } /** * Called when authenticated biometrics are cleared. */ public void onBiometricsCleared() { } } packages/SystemUI/src/com/android/systemui/doze/DozeAuthRemover.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.doze; import android.content.Context; import com.android.keyguard.KeyguardUpdateMonitor; /** * Controls removing Keyguard authorization when the phone goes to sleep. */ public class DozeAuthRemover implements DozeMachine.Part { KeyguardUpdateMonitor mKeyguardUpdateMonitor; public DozeAuthRemover(Context context) { mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context); } @Override public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { if (newState == DozeMachine.State.DOZE || newState == DozeMachine.State.DOZE_AOD) { int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mKeyguardUpdateMonitor.getUserUnlockedWithBiometric(currentUser)) { mKeyguardUpdateMonitor.clearBiometricRecognized(); } } } } packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +2 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ public class DozeFactory { createDozeScreenBrightness(context, wrappedService, sensorManager, host, params, handler), new DozeWallpaperState(context), new DozeDockHandler(context, machine, host, config, handler, dockManager) new DozeDockHandler(context, machine, host, config, handler, dockManager), new DozeAuthRemover(dozeService) }); return machine; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +5 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,11 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange public void onStrongAuthStateChanged(int userId) { update(); } @Override public void onBiometricsCleared() { update(); } }; @Inject Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -2325,6 +2325,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mUserFaceAuthenticated.clear(); mTrustManager.clearAllBiometricRecognized(BiometricSourceType.FINGERPRINT); mTrustManager.clearAllBiometricRecognized(BiometricSourceType.FACE); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onBiometricsCleared(); } } } public boolean isSimPinVoiceSecure() { Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +5 −0 Original line number Diff line number Diff line Loading @@ -314,4 +314,9 @@ public class KeyguardUpdateMonitorCallback { */ public void onLogoutEnabledChanged() { } /** * Called when authenticated biometrics are cleared. */ public void onBiometricsCleared() { } }
packages/SystemUI/src/com/android/systemui/doze/DozeAuthRemover.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.doze; import android.content.Context; import com.android.keyguard.KeyguardUpdateMonitor; /** * Controls removing Keyguard authorization when the phone goes to sleep. */ public class DozeAuthRemover implements DozeMachine.Part { KeyguardUpdateMonitor mKeyguardUpdateMonitor; public DozeAuthRemover(Context context) { mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context); } @Override public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { if (newState == DozeMachine.State.DOZE || newState == DozeMachine.State.DOZE_AOD) { int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mKeyguardUpdateMonitor.getUserUnlockedWithBiometric(currentUser)) { mKeyguardUpdateMonitor.clearBiometricRecognized(); } } } }
packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +2 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ public class DozeFactory { createDozeScreenBrightness(context, wrappedService, sensorManager, host, params, handler), new DozeWallpaperState(context), new DozeDockHandler(context, machine, host, config, handler, dockManager) new DozeDockHandler(context, machine, host, config, handler, dockManager), new DozeAuthRemover(dozeService) }); return machine; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +5 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,11 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange public void onStrongAuthStateChanged(int userId) { update(); } @Override public void onBiometricsCleared() { update(); } }; @Inject Loading