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

Commit 4e6678a4 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge changes I2041074b,Ib0960938,Ibbf21a8d

* changes:
  Window Manager Flag Migration (14/n) (Flips the flag)
  Temporarily ignore ScreenDecorWindowTests
  Allow showing when control target is IME fallback
parents 9ce274f1 2b39e764
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -223,26 +223,26 @@ public final class ViewRootImpl implements ViewParent,
     * @see #USE_NEW_INSETS_PROPERTY
     * @hide
     */
    public static int sNewInsetsMode =
            SystemProperties.getInt(USE_NEW_INSETS_PROPERTY, 0);
    public static final int NEW_INSETS_MODE_NONE = 0;

    /**
     * @see #USE_NEW_INSETS_PROPERTY
     * @hide
     */
    public static final int NEW_INSETS_MODE_NONE = 0;
    public static final int NEW_INSETS_MODE_IME = 1;

    /**
     * @see #USE_NEW_INSETS_PROPERTY
     * @hide
     */
    public static final int NEW_INSETS_MODE_IME = 1;
    public static final int NEW_INSETS_MODE_FULL = 2;

    /**
     * @see #USE_NEW_INSETS_PROPERTY
     * @hide
     */
    public static final int NEW_INSETS_MODE_FULL = 2;
    public static int sNewInsetsMode =
            SystemProperties.getInt(USE_NEW_INSETS_PROPERTY, NEW_INSETS_MODE_FULL);

    /**
     * Set this system property to true to force the view hierarchy to render
+4 −0
Original line number Diff line number Diff line
@@ -3597,6 +3597,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        if (target != null && target.getDisplayContent().canShowIme()) {
            return target;
        }
        return getImeFallback();
    }

    WindowState getImeFallback() {

        // host is in non-default display that doesn't support system decor, default to
        // default display's StatusBar to control IME.
+2 −1
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ class ImeInsetsSourceProvider extends InsetsSourceProvider {

        return (!dcTarget.isClosing() && mImeTargetFromIme == dcTarget)
                || (mImeTargetFromIme != null && dcTarget.getParentWindow() == mImeTargetFromIme
                && dcTarget.mSubLayer > mImeTargetFromIme.mSubLayer);
                        && dcTarget.mSubLayer > mImeTargetFromIme.mSubLayer)
                || mImeTargetFromIme == mDisplayContent.getImeFallback();
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;

import org.junit.After;
@@ -77,6 +78,8 @@ import java.util.function.BooleanSupplier;
 */
// TODO: Add test for FLAG_FULLSCREEN which hides the status bar and also other flags.
// TODO: Test non-Activity windows.
@FlakyTest(detail = "TODO (b/145242835): Re-enable once type mapping is implemented for "
        + "PRIVATE_FLAG_IS_SCREEN_DECOR")
@SmallTest
@Presubmit
public class ScreenDecorWindowTests {