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

Commit b55170e6 authored by Chandru S's avatar Chandru S
Browse files

Adding logs to identify any abnormal updates to the padding of the device entry icon


Bug: 359154646
Test: NA logs
Flag: EXEMPT adding logs
Change-Id: I2baf3541653de0c077a7ce3960a8e5c6f32b0455
parent 1b259fc1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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
@@ -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",
                                )
                            }
                        }
@@ -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(
@@ -171,7 +173,7 @@ constructor(
                FingerprintSensorProperties.TYPE_UNKNOWN,
                false /* halControlsIllumination */,
                true /* resetLockoutRequiresHardwareAuthToken */,
                listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT)
                listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT),
            )
    }
}
+6 −6
Original line number Diff line number Diff line
@@ -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()
@@ -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
@@ -107,10 +106,11 @@ constructor(
                        override fun onUdfpsLocationChanged(
                            udfpsOverlayParams: UdfpsOverlayParams
                        ) {
                            Log.d(TAG, "udfpsOverlayParams updated $udfpsOverlayParams")
                            trySendWithFailureLogging(
                                udfpsOverlayParams,
                                TAG,
                                "update udfpsOverlayParams"
                                "update udfpsOverlayParams",
                            )
                        }
                    }
+2 −0
Original line number Diff line number Diff line
@@ -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,