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

Commit c5b4c325 authored by bhinegardner's avatar bhinegardner Committed by Brad Hinegardner
Browse files

Add LogBuffers to KeyguardViewMediator

Test: manual test to dump new LogBuffer
Fixes: 237541090
Change-Id: Ie0d04359a913adc47ad1c74521f47401ce65dd7f
parent e69c094b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(

    fun e(@CompileTimeConstant msg: String) = log(msg, ERROR)

    fun v(@CompileTimeConstant msg: String) = log(msg, ERROR)
    fun v(@CompileTimeConstant msg: String) = log(msg, VERBOSE)

    fun w(@CompileTimeConstant msg: String) = log(msg, WARNING)

+690 −0

File added.

Preview size limit exceeded, changes collapsed.

+139 −168

File changed.

Preview size limit exceeded, changes collapsed.

+5 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.keyguard.dagger.KeyguardQsUserSwitchComponent;
import com.android.keyguard.dagger.KeyguardStatusBarViewComponent;
import com.android.keyguard.dagger.KeyguardStatusViewComponent;
import com.android.keyguard.dagger.KeyguardUserSwitcherComponent;
import com.android.keyguard.logging.KeyguardViewMediatorLogger;
import com.android.keyguard.mediator.ScreenOnCoordinator;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.broadcast.BroadcastDispatcher;
@@ -105,7 +106,8 @@ public class KeyguardModule {
            InteractionJankMonitor interactionJankMonitor,
            DreamOverlayStateController dreamOverlayStateController,
            Lazy<NotificationShadeWindowController> notificationShadeWindowController,
            Lazy<ActivityLaunchAnimator> activityLaunchAnimator) {
            Lazy<ActivityLaunchAnimator> activityLaunchAnimator,
            KeyguardViewMediatorLogger logger) {
        return new KeyguardViewMediator(
                context,
                falsingCollector,
@@ -132,7 +134,8 @@ public class KeyguardModule {
                interactionJankMonitor,
                dreamOverlayStateController,
                notificationShadeWindowController,
                activityLaunchAnimator);
                activityLaunchAnimator,
                logger);
    }

    /** */
+7 −2
Original line number Diff line number Diff line
@@ -158,8 +158,13 @@ class LogBuffer @JvmOverloads constructor(
     * add more detail to every log may do more to improve overall logging than adding more logs
     * with this method.
     */
    fun log(tag: String, level: LogLevel, @CompileTimeConstant message: String) =
            log(tag, level, {str1 = message}, { str1!! })
    fun log(
            tag: String,
            level: LogLevel,
            @CompileTimeConstant message: String,
            exception: Throwable? = null
    ) =
            log(tag, level, {str1 = message}, { str1!! }, exception)

    /**
     * You should call [log] instead of this method.
Loading