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

Commit c323f4a6 authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "Add more error logging for DISMISS" into main

parents 773ed4f8 df6c191d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2380,7 +2380,10 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
            }
            mCustomMessage = message;
            mKeyguardViewControllerLazy.get().dismissAndCollapse();
        } else if (callback != null) {
            return;
        }
        Log.w(TAG, "Ignoring request to DISMISS because mShowing=false");
        if (callback != null) {
            new DismissCallbackWrapper(callback).notifyDismissError();
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ constructor(
        afterKeyguardGone: Boolean,
        customMessage: String?,
    ) {
        Log.i(TAG, "Invoking dismissKeyguardThenExecute, afterKeyguardGone: $afterKeyguardGone")
        if (
            !action.willRunAnimationOnKeyguard() &&
                wakefulnessLifecycle.wakefulness == WakefulnessLifecycle.WAKEFULNESS_ASLEEP &&
+6 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi;
import kotlinx.coroutines.Job;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Objects;
@@ -899,6 +900,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
            } finally {
                Trace.endSection();
            }
        } else {
            Log.w(TAG, "Ignoring request to dismiss, dumping state: ");
            StringWriter sw = new StringWriter();
            mKeyguardStateController.dump(new PrintWriter(sw), null);
            Log.w(TAG, sw.toString());
        }
        updateStates();
    }
+6 −1
Original line number Diff line number Diff line
@@ -18,13 +18,16 @@ package com.android.systemui.statusbar.policy;

import android.app.IActivityTaskManager;

import com.android.systemui.Dumpable;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.policy.KeyguardStateController.Callback;

import java.io.PrintWriter;

/**
 * Source of truth for keyguard state: If locked, occluded, has password, trusted etc.
 */
public interface KeyguardStateController extends CallbackController<Callback> {
public interface KeyguardStateController extends CallbackController<Callback>, Dumpable {

    /**
     * If the device is locked or unlocked.
@@ -40,6 +43,8 @@ public interface KeyguardStateController extends CallbackController<Callback> {
        return isShowing() && !isOccluded();
    }

    default void dump(PrintWriter pw, String[] args) { }

    /**
     * If the keyguard is showing. This includes when it's occluded by an activity, and when
     * the device is asleep or in always on mode, except when the screen timed out and the user
+1 −2
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.keyguard.logging.KeyguardUpdateMonitorLogger;
import com.android.systemui.Dumpable;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlags;
@@ -57,7 +56,7 @@ import javax.inject.Inject;
 *
 */
@SysUISingleton
public class KeyguardStateControllerImpl implements KeyguardStateController, Dumpable {
public class KeyguardStateControllerImpl implements KeyguardStateController {

    private static final boolean DEBUG_AUTH_WITH_ADB = false;
    private static final String AUTH_BROADCAST_KEY = "debug_trigger_auth";