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

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

Merge "Added blur added in the restart dialog" into rvc-dev am: f7de5edb am:...

Merge "Added blur added in the restart dialog" into rvc-dev am: f7de5edb am: 32636b4a am: 3187a4ad am: 745f1cf0

Change-Id: Id4f8cdff9b470c7180f1169b49b5f4df868db42a
parents 09c0f4c0 745f1cf0
Loading
Loading
Loading
Loading
+14 −11
Original line number Original line Diff line number Diff line
@@ -98,8 +98,21 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks
    public void showShutdownUi(boolean isReboot, String reason) {
    public void showShutdownUi(boolean isReboot, String reason) {
        ScrimDrawable background = new ScrimDrawable();
        ScrimDrawable background = new ScrimDrawable();


        Dialog d = new Dialog(mContext,
        final Dialog d = new Dialog(mContext,
                com.android.systemui.R.style.Theme_SystemUI_Dialog_GlobalActions);
                com.android.systemui.R.style.Theme_SystemUI_Dialog_GlobalActions);

        d.setOnShowListener(dialog -> {
            if (mBlurUtils.supportsBlursOnWindows()) {
                background.setAlpha((int) (ScrimController.BLUR_SCRIM_ALPHA * 255));
                mBlurUtils.applyBlur(d.getWindow().getDecorView().getViewRootImpl(),
                        mBlurUtils.blurRadiusOfRatio(1));
            } else {
                float backgroundAlpha = mContext.getResources().getFloat(
                        com.android.systemui.R.dimen.shutdown_scrim_behind_alpha);
                background.setAlpha((int) (backgroundAlpha * 255));
            }
        });

        // Window initialization
        // Window initialization
        Window window = d.getWindow();
        Window window = d.getWindow();
        window.requestFeature(Window.FEATURE_NO_TITLE);
        window.requestFeature(Window.FEATURE_NO_TITLE);
@@ -146,16 +159,6 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks
            reasonView.setText(rebootReasonMessage);
            reasonView.setText(rebootReasonMessage);
        }
        }


        if (mBlurUtils.supportsBlursOnWindows()) {
            background.setAlpha((int) (ScrimController.BLUR_SCRIM_ALPHA * 255));
            mBlurUtils.applyBlur(d.getWindow().getDecorView().getViewRootImpl(),
                        mBlurUtils.blurRadiusOfRatio(1));
        } else {
            float backgroundAlpha = mContext.getResources().getFloat(
                    com.android.systemui.R.dimen.shutdown_scrim_behind_alpha);
            background.setAlpha((int) (backgroundAlpha * 255));
        }

        d.show();
        d.show();
    }
    }