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

Commit 1a814ba8 authored by Matthew Ng's avatar Matthew Ng
Browse files

Add more logs to investigate disappearing home button

This will check when bouncer is hiding and what binders are held to
prevent flags from showing the home button. Seems that after keyguard
decides to hide itself and passes no disabled flags, something might be
preventing it from setting the statusbar flags.

Bug: 113914868
Test: manual
Change-Id: I9d1aeeedfbb840a770331a7020d3ba1abb20f5c9
parent fe0efe6b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1939,11 +1939,6 @@ public class KeyguardViewMediator extends SystemUI {
                    mContext.getSystemService(Context.STATUS_BAR_SERVICE);
        }

        // TODO(b/113914868): investigation log for disappearing home button
        Log.d(TAG, "adjustStatusBarLocked (b/113914868): mShowing=" + mShowing
                + " mStatusBarManager=" + mStatusBarManager + " mOccluded="
                + mOccluded + " isSecure=" + isSecure() + " force=" + forceHideHomeRecentsButtons);

        if (mStatusBarManager == null) {
            Log.w(TAG, "Could not get status bar manager");
        } else {
@@ -1960,6 +1955,12 @@ public class KeyguardViewMediator extends SystemUI {
                        +  " --> flags=0x" + Integer.toHexString(flags));
            }

            // TODO(b/113914868): investigation log for disappearing home button
            Log.d(TAG, "adjustStatusBarLocked (b/113914868): flags=" + flags
                    + "mShowing=" + mShowing + " mStatusBarManager=" + mStatusBarManager
                    + " mOccluded=" + mOccluded + " isSecure=" + isSecure()
                    + " force=" + forceHideHomeRecentsButtons);

            mStatusBarManager.disable(flags);
        }
    }
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,8 @@ public class KeyguardBouncer {
    }

    public void hide(boolean destroyView) {
        // TODO(b/113914868): investigation log for disappearing home button
        Log.i(TAG, "KeyguardBouncer.hide (b/113914868): destroyView=" + destroyView);
        if (isShowing()) {
            StatsLog.write(StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED,
                StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN);
+15 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.os.UserHandle;
import android.service.notification.NotificationStats;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;

import com.android.internal.R;
@@ -670,6 +671,20 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
        // Ensure state for the current user is applied, even if passed a non-current user.
        final int net1 = gatherDisableActionsLocked(mCurrentUserId, 1);
        final int net2 = gatherDisableActionsLocked(mCurrentUserId, 2);

        // TODO(b/113914868): investigation log for disappearing home button
        if (whichFlag == 1 && pkg.contains("systemui")) {
            String disabledData = "{ ";
            for (int i = 0; i < mDisableRecords.size(); i++) {
                DisableRecord tok = mDisableRecords.get(i);
                disabledData += "    ([" + i + "] " + tok + "), ";
            }
            disabledData += " }";
            Log.d(TAG, "disabledlocked (b/113914868): net1=" + net1 + ", mDisabled1=" + mDisabled1
                    + ", token=" + token + ", mDisableRecords=" + mDisableRecords.size() + " => "
                    + disabledData);
        }

        if (net1 != mDisabled1 || net2 != mDisabled2) {
            mDisabled1 = net1;
            mDisabled2 = net2;