Loading packages/SystemUI/res-keyguard/drawable/progress_bar.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack"> <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" /> </shape> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> <clip> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/textColorPrimary" /> </shape> </clip> </item> </layer-list> No newline at end of file packages/SystemUI/res-keyguard/layout/sidefps_progress_bar.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2023 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. ~ --> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" android:layoutDirection="ltr" android:gravity="center" xmlns:android="http://schemas.android.com/apk/res/android"> <ProgressBar android:id="@+id/side_fps_progress_bar" android:layout_width="55dp" android:layout_height="10dp" android:indeterminateOnly="false" android:min="0" android:max="100" android:progressDrawable="@drawable/progress_bar" /> </LinearLayout> packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ import com.android.settingslib.Utils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.systemui.Dumpable; import com.android.systemui.res.R; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -177,6 +176,7 @@ import com.android.systemui.keyguard.shared.model.SysUiFaceAuthenticateOptions; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.TaskStackChangeListener; Loading Loading @@ -1984,6 +1984,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override public void onAuthenticationAcquired(int acquireInfo) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); mLogger.logFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); Trace.endSection(); } Loading packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +34 −7 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.google.errorprone.annotations.CompileTimeConstant import javax.inject.Inject private const val TAG = "KeyguardUpdateMonitorLog" private const val FP_LOG_TAG = "KeyguardFingerprintLog" /** Helper class for logging for [com.android.keyguard.KeyguardUpdateMonitor] */ class KeyguardUpdateMonitorLogger Loading Loading @@ -157,7 +158,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintAuthForWrongUser(authUserId: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = authUserId }, { "Fingerprint authenticated for wrong user: $int1" } Loading @@ -166,7 +167,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintDisabledForUser(userId: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId }, { "Fingerprint disabled by DPM for userId: $int1" } Loading @@ -174,12 +175,17 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { } fun logFingerprintLockoutReset(@LockoutMode mode: Int) { logBuffer.log(TAG, DEBUG, { int1 = mode }, { "handleFingerprintLockoutReset: $int1" }) logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = mode }, { "handleFingerprintLockoutReset: $int1" } ) } fun logFingerprintRunningState(fingerprintRunningState: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = fingerprintRunningState }, { "fingerprintRunningState: $int1" } Loading @@ -188,7 +194,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintSuccess(userId: Int, isStrongBiometric: Boolean) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId Loading @@ -212,7 +218,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintDetected(userId: Int, isStrongBiometric: Boolean) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId Loading @@ -224,7 +230,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintError(msgId: Int, originalErrMsg: String) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { str1 = originalErrMsg Loading Loading @@ -751,4 +757,25 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { { "userSwitchComplete: $str1, userId: $int1" } ) } fun logFingerprintHelp(helpMsgId: Int, helpString: CharSequence) { logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = helpMsgId str1 = "$helpString" }, { "fingerprint help message: $int1, $str1" } ) } fun logFingerprintAcquired(acquireInfo: Int) { logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = acquireInfo }, { "fingerprint acquire message: $int1" } ) } } packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +22 −2 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ import android.view.LayoutInflater import android.view.Surface import android.view.View import android.view.View.AccessibilityDelegate import android.view.View.INVISIBLE import android.view.View.VISIBLE import android.view.ViewPropertyAnimator import android.view.WindowManager import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION Loading @@ -54,13 +56,13 @@ import com.android.app.animation.Interpolators import com.android.internal.annotations.VisibleForTesting import com.android.keyguard.KeyguardPINView import com.android.systemui.Dumpable import com.android.systemui.res.R import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dump.DumpManager import com.android.systemui.res.R import com.android.systemui.util.boundsOnScreen import com.android.systemui.util.concurrency.DelayableExecutor import com.android.systemui.util.traceSection Loading Loading @@ -229,6 +231,20 @@ constructor( } } /** Hide the arrow indicator. */ fun hideIndicator() { val lottieAnimationView = overlayView?.findViewById(R.id.sidefps_animation) as LottieAnimationView? lottieAnimationView?.visibility = INVISIBLE } /** Show the arrow indicator. */ fun showIndicator() { val lottieAnimationView = overlayView?.findViewById(R.id.sidefps_animation) as LottieAnimationView? lottieAnimationView?.visibility = VISIBLE } override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("requests:") for (requestSource in requests) { Loading @@ -247,6 +263,10 @@ constructor( pw.println(" displayId=${displayInfo.uniqueId}") pw.println(" sensorType=${sensorProps?.sensorType}") pw.println(" location=${sensorProps?.getLocation(displayInfo.uniqueId)}") pw.println("lottieAnimationView:") pw.println( " visibility=${overlayView?.findViewById<View>(R.id.sidefps_animation)?.visibility}" ) pw.println("overlayOffsets=$overlayOffsets") pw.println("isReverseDefaultRotation=$isReverseDefaultRotation") Loading Loading @@ -498,5 +518,5 @@ enum class SideFpsUiRequestSource { AUTO_SHOW, /** Pin, pattern or password bouncer */ PRIMARY_BOUNCER, ALTERNATE_BOUNCER ALTERNATE_BOUNCER, } Loading
packages/SystemUI/res-keyguard/drawable/progress_bar.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack"> <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" /> </shape> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> <clip> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/textColorPrimary" /> </shape> </clip> </item> </layer-list> No newline at end of file
packages/SystemUI/res-keyguard/layout/sidefps_progress_bar.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2023 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. ~ --> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" android:layoutDirection="ltr" android:gravity="center" xmlns:android="http://schemas.android.com/apk/res/android"> <ProgressBar android:id="@+id/side_fps_progress_bar" android:layout_width="55dp" android:layout_height="10dp" android:indeterminateOnly="false" android:min="0" android:max="100" android:progressDrawable="@drawable/progress_bar" /> </LinearLayout>
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ import com.android.settingslib.Utils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.systemui.Dumpable; import com.android.systemui.res.R; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -177,6 +176,7 @@ import com.android.systemui.keyguard.shared.model.SysUiFaceAuthenticateOptions; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.TaskStackChangeListener; Loading Loading @@ -1984,6 +1984,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override public void onAuthenticationAcquired(int acquireInfo) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); mLogger.logFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); Trace.endSection(); } Loading
packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +34 −7 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.google.errorprone.annotations.CompileTimeConstant import javax.inject.Inject private const val TAG = "KeyguardUpdateMonitorLog" private const val FP_LOG_TAG = "KeyguardFingerprintLog" /** Helper class for logging for [com.android.keyguard.KeyguardUpdateMonitor] */ class KeyguardUpdateMonitorLogger Loading Loading @@ -157,7 +158,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintAuthForWrongUser(authUserId: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = authUserId }, { "Fingerprint authenticated for wrong user: $int1" } Loading @@ -166,7 +167,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintDisabledForUser(userId: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId }, { "Fingerprint disabled by DPM for userId: $int1" } Loading @@ -174,12 +175,17 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { } fun logFingerprintLockoutReset(@LockoutMode mode: Int) { logBuffer.log(TAG, DEBUG, { int1 = mode }, { "handleFingerprintLockoutReset: $int1" }) logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = mode }, { "handleFingerprintLockoutReset: $int1" } ) } fun logFingerprintRunningState(fingerprintRunningState: Int) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = fingerprintRunningState }, { "fingerprintRunningState: $int1" } Loading @@ -188,7 +194,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintSuccess(userId: Int, isStrongBiometric: Boolean) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId Loading @@ -212,7 +218,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintDetected(userId: Int, isStrongBiometric: Boolean) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { int1 = userId Loading @@ -224,7 +230,7 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun logFingerprintError(msgId: Int, originalErrMsg: String) { logBuffer.log( TAG, FP_LOG_TAG, DEBUG, { str1 = originalErrMsg Loading Loading @@ -751,4 +757,25 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { { "userSwitchComplete: $str1, userId: $int1" } ) } fun logFingerprintHelp(helpMsgId: Int, helpString: CharSequence) { logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = helpMsgId str1 = "$helpString" }, { "fingerprint help message: $int1, $str1" } ) } fun logFingerprintAcquired(acquireInfo: Int) { logBuffer.log( FP_LOG_TAG, DEBUG, { int1 = acquireInfo }, { "fingerprint acquire message: $int1" } ) } }
packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +22 −2 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ import android.view.LayoutInflater import android.view.Surface import android.view.View import android.view.View.AccessibilityDelegate import android.view.View.INVISIBLE import android.view.View.VISIBLE import android.view.ViewPropertyAnimator import android.view.WindowManager import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION Loading @@ -54,13 +56,13 @@ import com.android.app.animation.Interpolators import com.android.internal.annotations.VisibleForTesting import com.android.keyguard.KeyguardPINView import com.android.systemui.Dumpable import com.android.systemui.res.R import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dump.DumpManager import com.android.systemui.res.R import com.android.systemui.util.boundsOnScreen import com.android.systemui.util.concurrency.DelayableExecutor import com.android.systemui.util.traceSection Loading Loading @@ -229,6 +231,20 @@ constructor( } } /** Hide the arrow indicator. */ fun hideIndicator() { val lottieAnimationView = overlayView?.findViewById(R.id.sidefps_animation) as LottieAnimationView? lottieAnimationView?.visibility = INVISIBLE } /** Show the arrow indicator. */ fun showIndicator() { val lottieAnimationView = overlayView?.findViewById(R.id.sidefps_animation) as LottieAnimationView? lottieAnimationView?.visibility = VISIBLE } override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("requests:") for (requestSource in requests) { Loading @@ -247,6 +263,10 @@ constructor( pw.println(" displayId=${displayInfo.uniqueId}") pw.println(" sensorType=${sensorProps?.sensorType}") pw.println(" location=${sensorProps?.getLocation(displayInfo.uniqueId)}") pw.println("lottieAnimationView:") pw.println( " visibility=${overlayView?.findViewById<View>(R.id.sidefps_animation)?.visibility}" ) pw.println("overlayOffsets=$overlayOffsets") pw.println("isReverseDefaultRotation=$isReverseDefaultRotation") Loading Loading @@ -498,5 +518,5 @@ enum class SideFpsUiRequestSource { AUTO_SHOW, /** Pin, pattern or password bouncer */ PRIMARY_BOUNCER, ALTERNATE_BOUNCER ALTERNATE_BOUNCER, }