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

Commit 64227ee8 authored by Luca Zuccarini's avatar Luca Zuccarini Committed by Android (Google) Code Review
Browse files

Merge "Remove elevation from SystemUIDialog." into main

parents cec94f25 c77edee8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.systemui.statusbar.phone;

import static com.android.systemui.Flags.spatialModelAppPushback;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
@@ -291,6 +293,14 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
                /* backAnimationSpec= */mDelegate.getBackAnimationSpec(
                        () -> targetView.getResources().getDisplayMetrics())
        );

        if (spatialModelAppPushback()) {
            // Elevation doesn't seem to be useful anymore (there are no more shadows below
            // dialogs), and it creates a weird flickering behavior due to some obscure Window
            // Manager treatment. See b/404508609#comment3 for more details.
            // Note: can be moved to styles.xml once the flag is fully rolled out.
            getWindow().setElevation(0);
        }
    }

    private void updateWindowSize() {