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

Commit b4b97f4b authored by Aaron Heuckroth's avatar Aaron Heuckroth Committed by Android (Google) Code Review
Browse files

Merge "Fix crash on power menu rotation, and re-render power menu onUiModeChanged."

parents 01f1178b 4ef3a544
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -439,6 +439,9 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
    @Override
    public void onUiModeChanged() {
        mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
        if (mDialog.isShowing()) {
            mDialog.refreshDialog();
        }
    }

    public void destroy() {
@@ -1577,7 +1580,9 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,

            boolean panelEnabled = initializePanel();
            if (!panelEnabled) {
                if (mBackgroundDrawable == null) {
                    mBackgroundDrawable = new GradientDrawable(mContext);
                }
                mScrimAlpha = ScrimController.GRADIENT_SCRIM_ALPHA;
            } else {
                mBackgroundDrawable = mContext.getDrawable(
@@ -1720,11 +1725,15 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
            mKeyguardShowing = keyguardShowing;
        }

        public void onRotate(int from, int to) {
            if (mShowing && isGridEnabled(mContext)) {
        public void refreshDialog() {
            initializeLayout();
            mGlobalActionsLayout.updateList();
        }

        public void onRotate(int from, int to) {
            if (mShowing && isGridEnabled(mContext)) {
                refreshDialog();
            }
        }
    }