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

Commit c673fbc2 authored by Yoshinori Hirano's avatar Yoshinori Hirano Committed by Jason Monk
Browse files

Collapse QS panel forcibly after dismissing Keyguard

The Quick Settings panel is not collapsed when the screen lock is
unlocked by using TileService APIs (unlockAndRun() and
startActivityAndCollapse()).
To fix this issue, the QS panel should be collapsed forcibly when
startActivityAndCollapse() is called.

Bug: 38252721
Test: manual - install an app which calls startActivityAndCollapse()
               inside the runnable passed to unlockAndRun().

Author: Yuta Yamada <yuta.x.yamada@sonymobile.com>
Change-Id: I82d1df368d5024283f58ee5cc2d42559aac28467
parent 8d902a9e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import java.util.Collection;
public interface QSHost {
    void warn(String message, Throwable t);
    void collapsePanels();
    void forceCollapsePanels();
    void openPanels();
    Context getContext();
    Collection<QSTile> getTiles();
+5 −0
Original line number Diff line number Diff line
@@ -142,6 +142,11 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory> {
        mStatusBar.postAnimateCollapsePanels();
    }

    @Override
    public void forceCollapsePanels() {
        mStatusBar.postAnimateForceCollapsePanels();
    }

    @Override
    public void openPanels() {
        mStatusBar.postAnimateOpenPanels();
+2 −2
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ public class TileServices extends IQSService.Stub {
        if (customTile != null) {
            verifyCaller(customTile);
            customTile.onDialogShown();
            mHost.collapsePanels();
            mHost.forceCollapsePanels();
            mServices.get(customTile).setShowingDialog(true);
        }
    }
@@ -224,7 +224,7 @@ public class TileServices extends IQSService.Stub {
        CustomTile customTile = getTileForToken(token);
        if (customTile != null) {
            verifyCaller(customTile);
            mHost.collapsePanels();
            mHost.forceCollapsePanels();
        }
    }

+9 −0
Original line number Diff line number Diff line
@@ -2878,6 +2878,15 @@ public class StatusBar extends SystemUI implements DemoMode,
        mHandler.post(mAnimateCollapsePanels);
    }

    public void postAnimateForceCollapsePanels() {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
            }
        });
    }

    public void postAnimateOpenPanels() {
        mHandler.sendEmptyMessage(MSG_OPEN_SETTINGS_PANEL);
    }