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

Commit 53f28ecc authored by Adrian Roos's avatar Adrian Roos
Browse files

Improve dump of status bar service

Tracks which window caused the disable flags
instead of just blaming PhoneWindowManager.

Bug: 17830264
Change-Id: If6c957120bb2ee8e0083f80e35c71eb21b8672b6
parent 09895be8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ interface IStatusBarService
    void onNotificationVisibilityChanged(
    void onNotificationVisibilityChanged(
            in String[] newlyVisibleKeys, in String[] noLongerVisibleKeys);
            in String[] newlyVisibleKeys, in String[] noLongerVisibleKeys);
    void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded);
    void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded);
    void setSystemUiVisibility(int vis, int mask);
    void setSystemUiVisibility(int vis, int mask, String cause);
    void setWindowState(int window, int state);
    void setWindowState(int window, int state);


    void showRecentApps(boolean triggeredFromAltTab);
    void showRecentApps(boolean triggeredFromAltTab);
+2 −1
Original line number Original line Diff line number Diff line
@@ -171,7 +171,8 @@ public final class NavigationBarTransitions extends BarTransitions {
                applyLightsOut(false, false, false);
                applyLightsOut(false, false, false);


                try {
                try {
                    mBarService.setSystemUiVisibility(0, View.SYSTEM_UI_FLAG_LOW_PROFILE);
                    mBarService.setSystemUiVisibility(0, View.SYSTEM_UI_FLAG_LOW_PROFILE,
                            "LightsOutListener");
                } catch (android.os.RemoteException ex) {
                } catch (android.os.RemoteException ex) {
                }
                }
            }
            }
+3 −2
Original line number Original line Diff line number Diff line
@@ -5730,7 +5730,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    private int updateSystemUiVisibilityLw() {
    private int updateSystemUiVisibilityLw() {
        // If there is no window focused, there will be nobody to handle the events
        // If there is no window focused, there will be nobody to handle the events
        // anyway, so just hang on in whatever state we're in until things settle down.
        // anyway, so just hang on in whatever state we're in until things settle down.
        WindowState win = mFocusedWindow != null ? mFocusedWindow : mTopFullscreenOpaqueWindowState;
        final WindowState win = mFocusedWindow != null ? mFocusedWindow
                : mTopFullscreenOpaqueWindowState;
        if (win == null) {
        if (win == null) {
            return 0;
            return 0;
        }
        }
@@ -5766,7 +5767,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    try {
                    try {
                        IStatusBarService statusbar = getStatusBarService();
                        IStatusBarService statusbar = getStatusBarService();
                        if (statusbar != null) {
                        if (statusbar != null) {
                            statusbar.setSystemUiVisibility(visibility, 0xffffffff);
                            statusbar.setSystemUiVisibility(visibility, 0xffffffff, win.toString());
                            statusbar.topAppWindowChanged(needsMenu);
                            statusbar.topAppWindowChanged(needsMenu);
                        }
                        }
                    } catch (RemoteException e) {
                    } catch (RemoteException e) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -353,7 +353,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
    }
    }


    @Override
    @Override
    public void setSystemUiVisibility(int vis, int mask) {
    public void setSystemUiVisibility(int vis, int mask, String cause) {
        // also allows calls from window manager which is in this process.
        // also allows calls from window manager which is in this process.
        enforceStatusBarService();
        enforceStatusBarService();


@@ -365,7 +365,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
                    mCurrentUserId,
                    mCurrentUserId,
                    vis & StatusBarManager.DISABLE_MASK,
                    vis & StatusBarManager.DISABLE_MASK,
                    mSysUiVisToken,
                    mSysUiVisToken,
                    "WindowManager.LayoutParams");
                    cause);
        }
        }
    }
    }