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

Commit 136abbb5 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Use background handler for biometrics DisplayStateRepositoryImpl

This call was causing long waiting time on the UI thread during unfold.
Moving it to the background will result in faster unfolds.

Bug: 323880605
Test: DisplayStateRepositoryTest
Flag: None
Change-Id: Ic80826cfad2ca03f7bcdd8e369c87ce7ba7a5e39
parent 486f04c0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCall
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
import java.util.concurrent.Executor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
@@ -76,7 +75,7 @@ constructor(
    @Application val context: Context,
    deviceStateManager: DeviceStateManager,
    displayManager: DisplayManager,
    @Main handler: Handler,
    @Background backgroundHandler: Handler,
    @Background backgroundExecutor: Executor,
    @Background backgroundDispatcher: CoroutineDispatcher,
) : DisplayStateRepository {
@@ -146,7 +145,7 @@ constructor(
                    }
                displayManager.registerDisplayListener(
                    callback,
                    handler,
                    backgroundHandler,
                    EVENT_FLAG_DISPLAY_CHANGED
                )
                awaitClose { displayManager.unregisterDisplayListener(callback) }