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

Commit bbc49941 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android Git Automerger
Browse files

am a76164e1: Merge "Only use bottom outset for main display." into klp-modular-dev

* commit 'a76164e1':
  Only use bottom outset for main display.
parents 64ae9303 a76164e1
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ import android.util.SparseArray;
import android.util.TypedValue;
import android.view.ActionMode;
import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.Gravity;
import android.view.IRotationWatcher;
import android.view.IWindowManager;
@@ -2941,9 +2942,17 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            a.getValue(com.android.internal.R.styleable.Window_windowFixedHeightMinor,
                    mFixedHeightMinor);
        }
        if (a.hasValue(com.android.internal.R.styleable.Window_windowOutsetBottom)) {

        final WindowManager windowService = (WindowManager) getContext().getSystemService(
                Context.WINDOW_SERVICE);
        if (windowService != null) {
            final Display display = windowService.getDefaultDisplay();
            if (display.getDisplayId() == Display.DEFAULT_DISPLAY &&
                    a.hasValue(com.android.internal.R.styleable.Window_windowOutsetBottom)) {
                if (mOutsetBottom == null) mOutsetBottom = new TypedValue();
            a.getValue(com.android.internal.R.styleable.Window_windowOutsetBottom, mOutsetBottom);
                a.getValue(com.android.internal.R.styleable.Window_windowOutsetBottom,
                        mOutsetBottom);
            }
        }

        final Context context = getContext();