Loading packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt +6 −4 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager import android.hardware.fingerprint.FingerprintSensorProperties import android.hardware.fingerprint.FingerprintSensorPropertiesInternal import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback import android.util.Log import com.android.systemui.biometrics.shared.model.FingerprintSensorType import com.android.systemui.biometrics.shared.model.SensorStrength import com.android.systemui.biometrics.shared.model.toSensorStrength Loading Loading @@ -91,13 +92,14 @@ constructor( trySendWithFailureLogging( DEFAULT_PROPS, TAG, "no registered sensors, use default props" "no registered sensors, use default props", ) } else { Log.d(TAG, "onAllAuthenticatorsRegistered $sensors") trySendWithFailureLogging( sensors[0], TAG, "update properties on authenticators registered" "update properties on authenticators registered", ) } } Loading Loading @@ -160,7 +162,7 @@ constructor( FingerprintSensorProperties.TYPE_UNKNOWN, false /* halControlsIllumination */, true /* resetLockoutRequiresHardwareAuthToken */, listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT) listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT), ) private val DEFAULT_PROPS = FingerprintSensorPropertiesInternal( Loading @@ -171,7 +173,7 @@ constructor( FingerprintSensorProperties.TYPE_UNKNOWN, false /* halControlsIllumination */, true /* resetLockoutRequiresHardwareAuthToken */, listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT) listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT), ) } } packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt +6 −6 Original line number Diff line number Diff line Loading @@ -48,14 +48,14 @@ constructor( private val authController: AuthController, private val selectedUserInteractor: SelectedUserInteractor, private val fingerprintManager: FingerprintManager?, @Application scope: CoroutineScope @Application scope: CoroutineScope, ) { private fun calculateIconSize(): Int { val pixelPitch = context.resources.getFloat(R.dimen.pixel_pitch) if (pixelPitch <= 0) { Log.e( "UdfpsOverlayInteractor", "invalid pixelPitch: $pixelPitch. Pixel pitch must be updated per device." "invalid pixelPitch: $pixelPitch. Pixel pitch must be updated per device.", ) } return (context.resources.getFloat(R.dimen.udfps_icon_size) / pixelPitch).toInt() Loading Loading @@ -83,12 +83,11 @@ constructor( /** Sets whether Udfps overlay should handle touches */ fun setHandleTouches(shouldHandle: Boolean = true) { if (authController.isUdfpsSupported && shouldHandle != _shouldHandleTouches.value) { if (authController.isUdfpsSupported && shouldHandle != _shouldHandleTouches.value) { fingerprintManager?.setIgnoreDisplayTouches( requestId.value, authController.udfpsProps!!.get(0).sensorId, !shouldHandle !shouldHandle, ) } _shouldHandleTouches.value = shouldHandle Loading @@ -107,10 +106,11 @@ constructor( override fun onUdfpsLocationChanged( udfpsOverlayParams: UdfpsOverlayParams ) { Log.d(TAG, "udfpsOverlayParams updated $udfpsOverlayParams") trySendWithFailureLogging( udfpsOverlayParams, TAG, "update udfpsOverlayParams" "update udfpsOverlayParams", ) } } Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt +2 −0 Original line number Diff line number Diff line Loading @@ -182,9 +182,11 @@ object DeviceEntryIconViewBinder { fgIconView.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { // Start with an empty state Log.d(TAG, "Initializing device entry fgIconView") fgIconView.setImageState(StateSet.NOTHING, /* merge */ false) launch("$TAG#fpIconView.viewModel") { fgViewModel.viewModel.collect { viewModel -> Log.d(TAG, "Updating device entry icon image state $viewModel") fgIconView.setImageState( view.getIconState(viewModel.type, viewModel.useAodVariant), /* merge */ false, Loading packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import com.android.systemui.motion.createSysUiComposeMotionTestRule import com.android.systemui.res.R import com.android.systemui.scene.domain.startable.sceneContainerStartable import com.android.systemui.testKosmos import kotlin.time.Duration.Companion.seconds import org.junit.After import org.junit.Before import org.junit.Rule Loading Loading @@ -109,7 +110,7 @@ class BouncerContentTest : SysuiTestCase() { @Test fun doubleClick_swapSide() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val motion = recordMotion( content = { BouncerContentUnderTest() }, Loading packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt +3 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.haptics.msdl.bouncerHapticPlayer import com.android.systemui.lifecycle.activateIn import com.android.systemui.motion.createSysUiComposeMotionTestRule import com.android.systemui.testKosmos import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.takeWhile Loading Loading @@ -71,7 +72,7 @@ class PatternBouncerTest : SysuiTestCase() { @Test fun entryAnimation() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val motion = recordMotion( content = { play -> if (play) PatternBouncerUnderTest() }, Loading @@ -89,7 +90,7 @@ class PatternBouncerTest : SysuiTestCase() { @Test fun animateFailure() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val failureAnimationMotionControl = MotionControl( delayReadyToPlay = { Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt +6 −4 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager import android.hardware.fingerprint.FingerprintSensorProperties import android.hardware.fingerprint.FingerprintSensorPropertiesInternal import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback import android.util.Log import com.android.systemui.biometrics.shared.model.FingerprintSensorType import com.android.systemui.biometrics.shared.model.SensorStrength import com.android.systemui.biometrics.shared.model.toSensorStrength Loading Loading @@ -91,13 +92,14 @@ constructor( trySendWithFailureLogging( DEFAULT_PROPS, TAG, "no registered sensors, use default props" "no registered sensors, use default props", ) } else { Log.d(TAG, "onAllAuthenticatorsRegistered $sensors") trySendWithFailureLogging( sensors[0], TAG, "update properties on authenticators registered" "update properties on authenticators registered", ) } } Loading Loading @@ -160,7 +162,7 @@ constructor( FingerprintSensorProperties.TYPE_UNKNOWN, false /* halControlsIllumination */, true /* resetLockoutRequiresHardwareAuthToken */, listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT) listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT), ) private val DEFAULT_PROPS = FingerprintSensorPropertiesInternal( Loading @@ -171,7 +173,7 @@ constructor( FingerprintSensorProperties.TYPE_UNKNOWN, false /* halControlsIllumination */, true /* resetLockoutRequiresHardwareAuthToken */, listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT) listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT), ) } }
packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt +6 −6 Original line number Diff line number Diff line Loading @@ -48,14 +48,14 @@ constructor( private val authController: AuthController, private val selectedUserInteractor: SelectedUserInteractor, private val fingerprintManager: FingerprintManager?, @Application scope: CoroutineScope @Application scope: CoroutineScope, ) { private fun calculateIconSize(): Int { val pixelPitch = context.resources.getFloat(R.dimen.pixel_pitch) if (pixelPitch <= 0) { Log.e( "UdfpsOverlayInteractor", "invalid pixelPitch: $pixelPitch. Pixel pitch must be updated per device." "invalid pixelPitch: $pixelPitch. Pixel pitch must be updated per device.", ) } return (context.resources.getFloat(R.dimen.udfps_icon_size) / pixelPitch).toInt() Loading Loading @@ -83,12 +83,11 @@ constructor( /** Sets whether Udfps overlay should handle touches */ fun setHandleTouches(shouldHandle: Boolean = true) { if (authController.isUdfpsSupported && shouldHandle != _shouldHandleTouches.value) { if (authController.isUdfpsSupported && shouldHandle != _shouldHandleTouches.value) { fingerprintManager?.setIgnoreDisplayTouches( requestId.value, authController.udfpsProps!!.get(0).sensorId, !shouldHandle !shouldHandle, ) } _shouldHandleTouches.value = shouldHandle Loading @@ -107,10 +106,11 @@ constructor( override fun onUdfpsLocationChanged( udfpsOverlayParams: UdfpsOverlayParams ) { Log.d(TAG, "udfpsOverlayParams updated $udfpsOverlayParams") trySendWithFailureLogging( udfpsOverlayParams, TAG, "update udfpsOverlayParams" "update udfpsOverlayParams", ) } } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt +2 −0 Original line number Diff line number Diff line Loading @@ -182,9 +182,11 @@ object DeviceEntryIconViewBinder { fgIconView.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { // Start with an empty state Log.d(TAG, "Initializing device entry fgIconView") fgIconView.setImageState(StateSet.NOTHING, /* merge */ false) launch("$TAG#fpIconView.viewModel") { fgViewModel.viewModel.collect { viewModel -> Log.d(TAG, "Updating device entry icon image state $viewModel") fgIconView.setImageState( view.getIconState(viewModel.type, viewModel.useAodVariant), /* merge */ false, Loading
packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import com.android.systemui.motion.createSysUiComposeMotionTestRule import com.android.systemui.res.R import com.android.systemui.scene.domain.startable.sceneContainerStartable import com.android.systemui.testKosmos import kotlin.time.Duration.Companion.seconds import org.junit.After import org.junit.Before import org.junit.Rule Loading Loading @@ -109,7 +110,7 @@ class BouncerContentTest : SysuiTestCase() { @Test fun doubleClick_swapSide() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val motion = recordMotion( content = { BouncerContentUnderTest() }, Loading
packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt +3 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.haptics.msdl.bouncerHapticPlayer import com.android.systemui.lifecycle.activateIn import com.android.systemui.motion.createSysUiComposeMotionTestRule import com.android.systemui.testKosmos import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.takeWhile Loading Loading @@ -71,7 +72,7 @@ class PatternBouncerTest : SysuiTestCase() { @Test fun entryAnimation() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val motion = recordMotion( content = { play -> if (play) PatternBouncerUnderTest() }, Loading @@ -89,7 +90,7 @@ class PatternBouncerTest : SysuiTestCase() { @Test fun animateFailure() = motionTestRule.runTest { motionTestRule.runTest(timeout = 30.seconds) { val failureAnimationMotionControl = MotionControl( delayReadyToPlay = { Loading