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

Commit d8acb5be authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "add westworld log to global actions dismiss" into rvc-dev am: 2619a020 am: f3d3d8c1

Change-Id: Ib09656606e60d1e7292226982e8962928ae7f5af
parents 1630757b f3d3d8c1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -206,7 +206,8 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
    @VisibleForTesting
    protected final ArrayList<Action> mOverflowItems = new ArrayList<>();

    private ActionsDialog mDialog;
    @VisibleForTesting
    protected ActionsDialog mDialog;

    private Action mSilentModeAction;
    private ToggleAction mAirplaneModeOn;
@@ -246,6 +247,9 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
        @UiEvent(doc = "The global actions / power menu surface became visible on the screen.")
        GA_POWER_MENU_OPEN(337),

        @UiEvent(doc = "The global actions / power menu surface was dismissed.")
        GA_POWER_MENU_CLOSE(471),

        @UiEvent(doc = "The global actions bugreport button was pressed.")
        GA_BUGREPORT_PRESS(344),

@@ -1167,6 +1171,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
        if (mDialog == dialog) {
            mDialog = null;
        }
        mUiEventLogger.log(GlobalActionsEvent.GA_POWER_MENU_CLOSE);
        mWindowManagerFuncs.onGlobalActionsHidden();
        mLifecycle.setCurrentState(Lifecycle.State.DESTROYED);
    }
+8 −1
Original line number Diff line number Diff line
@@ -156,12 +156,19 @@ public class GlobalActionsDialogTest extends SysuiTestCase {
    }

    @Test
    public void testShouldLogVisibility() {
    public void testShouldLogShow() {
        mGlobalActionsDialog.onShow(null);
        mTestableLooper.processAllMessages();
        verifyLogPosted(GlobalActionsDialog.GlobalActionsEvent.GA_POWER_MENU_OPEN);
    }

    @Test
    public void testShouldLogDismiss() {
        mGlobalActionsDialog.onDismiss(mGlobalActionsDialog.mDialog);
        mTestableLooper.processAllMessages();
        verifyLogPosted(GlobalActionsDialog.GlobalActionsEvent.GA_POWER_MENU_CLOSE);
    }

    @Test
    public void testShouldLogBugreportPress() throws InterruptedException {
        GlobalActionsDialog.BugReportAction bugReportAction =