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

Commit 5f0e9989 authored by Matt Pietal's avatar Matt Pietal Committed by Automerger Merge Worker
Browse files

Merge "Global Actions - Close and long press while open" into rvc-dev am:...

Merge "Global Actions - Close and long press while open" into rvc-dev am: 2e9b2b32 am: 2ff74598 am: ed08ec65

Change-Id: I72a59f103d79330d73e34d1bcede518b204cc9b6
parents 4b522b97 ed08ec65
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -415,16 +415,19 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
     *
     * @param keyguardShowing True if keyguard is showing
     */
    public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned,
    public void showOrHideDialog(boolean keyguardShowing, boolean isDeviceProvisioned,
            GlobalActionsPanelPlugin panelPlugin) {
        mKeyguardShowing = keyguardShowing;
        mDeviceProvisioned = isDeviceProvisioned;
        mPanelPlugin = panelPlugin;
        if (mDialog != null) {
        if (mDialog != null && mDialog.isShowing()) {
            // In order to force global actions to hide on the same affordance press, we must
            // register a call to onGlobalActionsShown() first to prevent the default actions
            // menu from showing. This will be followed by a subsequent call to
            // onGlobalActionsHidden() on dismiss()
            mWindowManagerFuncs.onGlobalActionsShown();
            mDialog.dismiss();
            mDialog = null;
            // Show delayed, so that the dismiss of the previous dialog completes
            mHandler.sendEmptyMessage(MESSAGE_SHOW);
        } else {
            handleShow();
        }
@@ -1805,7 +1808,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,

    private static final int MESSAGE_DISMISS = 0;
    private static final int MESSAGE_REFRESH = 1;
    private static final int MESSAGE_SHOW = 2;
    private static final int DIALOG_DISMISS_DELAY = 300; // ms
    private static final int DIALOG_PRESS_DELAY = 850; // ms

@@ -1830,9 +1832,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
                    refreshSilentMode();
                    mAdapter.notifyDataSetChanged();
                    break;
                case MESSAGE_SHOW:
                    handleShow();
                    break;
            }
        }
    };
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks
    public void showGlobalActions(GlobalActionsManager manager) {
        if (mDisabled) return;
        mGlobalActionsDialog = mGlobalActionsDialogLazy.get();
        mGlobalActionsDialog.showDialog(mKeyguardStateController.isShowing(),
        mGlobalActionsDialog.showOrHideDialog(mKeyguardStateController.isShowing(),
                mDeviceProvisionedController.isDeviceProvisioned(),
                mPanelExtension.get());
        Dependency.get(KeyguardUpdateMonitor.class).requestFaceAuth();