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

Commit 42e5b3e2 authored by Matt Pietal's avatar Matt Pietal
Browse files

Add more logging

More information to help debug shade states

Bug: 327673344
Test: manual - check log output
Flag: N/A
Change-Id: I35683a48bf2351f83babd99c49bf2069cc075fa9
parent bc25576f
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.log.core.LogLevel.VERBOSE
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
@@ -37,6 +39,8 @@ constructor(
    private val keyguardInteractor: KeyguardInteractor,
    private val logger: KeyguardLogger,
    private val powerInteractor: PowerInteractor,
    private val sharedNotificationContainerViewModel: SharedNotificationContainerViewModel,
    private val shadeInteractor: ShadeInteractor,
) {

    fun start() {
@@ -46,6 +50,30 @@ constructor(
            }
        }

        scope.launch {
            sharedNotificationContainerViewModel
                .getMaxNotifications { height, useExtraShelfSpace -> height.toInt() }
                .collect { logger.log(TAG, VERBOSE, "Notif: max height in px", it) }
        }

        scope.launch {
            sharedNotificationContainerViewModel.isOnLockscreen.collect {
                logger.log(TAG, VERBOSE, "Notif: isOnLockscreen", it)
            }
        }

        scope.launch {
            shadeInteractor.isUserInteracting.collect {
                logger.log(TAG, VERBOSE, "Shade: isUserInteracting", it)
            }
        }

        scope.launch {
            sharedNotificationContainerViewModel.isOnLockscreenWithoutShade.collect {
                logger.log(TAG, VERBOSE, "Notif: isOnLockscreenWithoutShade", it)
            }
        }

        scope.launch {
            keyguardInteractor.primaryBouncerShowing.collect {
                logger.log(TAG, VERBOSE, "Primary bouncer showing", it)
@@ -74,6 +102,18 @@ constructor(
            }
        }

        scope.launch {
            keyguardInteractor.isKeyguardDismissible.collect {
                logger.log(TAG, VERBOSE, "isDismissible", it)
            }
        }

        scope.launch {
            keyguardInteractor.isKeyguardShowing.collect {
                logger.log(TAG, VERBOSE, "isShowing", it)
            }
        }

        scope.launch {
            keyguardInteractor.dozeTransitionModel.collect {
                logger.log(TAG, VERBOSE, "Doze transition", it)
+1 −1
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ public class LogModule {
    @SysUISingleton
    @KeyguardLog
    public static LogBuffer provideKeyguardLogBuffer(LogBufferFactory factory) {
        return factory.create("KeyguardLog", 250);
        return factory.create("KeyguardLog", 500);
    }

    /**