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

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

am 21187a7a: Merge "Allowing isRound and outsetBottom properties to be passed...

am 21187a7a: Merge "Allowing isRound and outsetBottom properties to be passed to ActivityView." into lmp-dev

* commit '21187a7a57bf6455fb2ffa8a7cf27fb20308a0b1':
  Allowing isRound and outsetBottom properties to be passed to ActivityView.
parents 79dbddef 30a480bc
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -333,6 +333,8 @@ public final class ViewRootImpl implements ViewParent,
    private boolean mRemoved;

    private boolean mIsEmulator;
    private boolean mIsCircularEmulator;
    private final boolean mWindowIsRound;

    /**
     * Consistency verifier for debugging purposes.
@@ -388,6 +390,8 @@ public final class ViewRootImpl implements ViewParent,
        mChoreographer = Choreographer.getInstance();
        mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
        loadSystemProperties();
        mWindowIsRound = context.getResources().getBoolean(
                com.android.internal.R.bool.config_windowIsRound);
    }

    public static void addFirstDrawHandler(Runnable callback) {
@@ -1183,14 +1187,7 @@ public final class ViewRootImpl implements ViewParent,
    void dispatchApplyInsets(View host) {
        mDispatchContentInsets.set(mAttachInfo.mContentInsets);
        mDispatchStableInsets.set(mAttachInfo.mStableInsets);
        boolean isRound = false;
        if ((mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN) != 0
                && mDisplay.getDisplayId() == 0) {
            // we're fullscreen and not hosted in an ActivityView
            isRound = (mIsEmulator && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))
                    || mContext.getResources().getBoolean(
                            com.android.internal.R.bool.config_windowIsRound);
        }
        final boolean isRound = (mIsEmulator && mIsCircularEmulator) || mWindowIsRound;
        host.dispatchApplyWindowInsets(new WindowInsets(
                mDispatchContentInsets, null /* windowDecorInsets */,
                mDispatchStableInsets, isRound));
@@ -5431,6 +5428,8 @@ public final class ViewRootImpl implements ViewParent,

                // detect emulator
                mIsEmulator = Build.HARDWARE.contains("goldfish");
                mIsCircularEmulator =
                        SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false);
            }
        });
    }
+4 −2
Original line number Diff line number Diff line
@@ -3206,8 +3206,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                Context.WINDOW_SERVICE);
        if (windowService != null) {
            final Display display = windowService.getDefaultDisplay();
            if (display.getDisplayId() == Display.DEFAULT_DISPLAY &&
                    a.hasValue(R.styleable.Window_windowOutsetBottom)) {
            final boolean shouldUseBottomOutset =
                    display.getDisplayId() == Display.DEFAULT_DISPLAY
                            || (getForcedWindowFlags() & FLAG_FULLSCREEN) != 0;
            if (shouldUseBottomOutset && a.hasValue(R.styleable.Window_windowOutsetBottom)) {
                if (mOutsetBottom == null) mOutsetBottom = new TypedValue();
                a.getValue(R.styleable.Window_windowOutsetBottom,
                        mOutsetBottom);