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

Commit ff6ce285 authored by Beverly's avatar Beverly
Browse files

Add extra logging for debugging UdfpsControllerOverlay

Bug: 433873157
Flag: EXEMPT logs only
Test: N/A
Change-Id: I844d92cd593466d31ef2969fa1d789be4ee3a9e5
parent 2397c213
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.hardware.biometrics.BiometricRequestConstants.REASON_ENROLL_ENROL
import android.hardware.biometrics.BiometricRequestConstants.REASON_ENROLL_FIND_SENSOR
import android.hardware.biometrics.BiometricRequestConstants.RequestReason
import android.hardware.fingerprint.IUdfpsOverlayControllerCallback
import android.os.Build
import android.os.RemoteException
import android.os.Trace
import android.util.Log
@@ -213,6 +214,9 @@ constructor(
        addViewRunnable =
            kotlinx.coroutines.Runnable {
                Trace.setCounter("UdfpsAddView", 1)
                if (Build.IS_DEBUGGABLE) {
                    Log.d(TAG, "adding view=$view")
                }
                windowManager.addView(view, coreLayoutParams.updateDimensions(animation))
            }
        if (powerInteractor.detailedWakefulness.value.isAwake()) {
@@ -250,10 +254,14 @@ constructor(
    /** Hide the overlay or return false and do nothing if it is already hidden. */
    fun hide(): Boolean {
        val wasShowing = isShowing
        Log.d(TAG, "hideUdfpsControllerOverlay wasShowing=$wasShowing")

        udfpsDisplayModeProvider.disable(null)
        getTouchOverlay()?.apply {
            if (this.parent != null) {
                if (Build.IS_DEBUGGABLE) {
                    Log.d(TAG, "removing view=$this")
                }
                windowManager.removeView(this)
            }
            Trace.setCounter("UdfpsAddView", 0)