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

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

Merge "Make dialog fit under the notch in landscape mode" into rvc-dev am:...

Merge "Make dialog fit under the notch in landscape mode" into rvc-dev am: bc6ad8ec am: 2edfc918 am: 1a11f302

Change-Id: Ief5114e86b226fe3e79226522e5bf644f3a77f48
parents 05b2f5be 1a11f302
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Color;
import android.graphics.Insets;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.net.ConnectivityManager;
@@ -71,6 +72,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
@@ -1905,6 +1907,14 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
                                mGlobalActionsLayout);
                    })
                    .start();
            ViewGroup root = (ViewGroup) mGlobalActionsLayout.getRootView();
            root.setOnApplyWindowInsetsListener((v, windowInsets) -> {
                if (mControlsUiController != null) {
                    Insets insets = windowInsets.getInsets(WindowInsets.Type.all());
                    root.setPadding(insets.left, insets.top, insets.right, insets.bottom);
                }
                return WindowInsets.CONSUMED;
            });
            if (mControlsUiController != null) {
                mControlsUiController.show(mControlsView);
            }