Loading core/java/android/view/WindowInsets.java +5 −9 Original line number Diff line number Diff line Loading @@ -1498,10 +1498,8 @@ public final class WindowInsets { mTypeInsetsMap = insets.mTypeInsetsMap.clone(); mTypeMaxInsetsMap = insets.mTypeMaxInsetsMap.clone(); mTypeVisibilityMap = insets.mTypeVisibilityMap.clone(); if (com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()) { mCompatInsetTypes = insets.mCompatInsetsTypes; mCompatIgnoreVisibility = insets.mCompatIgnoreVisibility; } mSystemInsetsConsumed = insets.mSystemWindowInsetsConsumed; mStableInsetsConsumed = insets.mStableInsetsConsumed; mDisplayCutout = displayCutoutCopyConstructorArgument(insets); Loading Loading @@ -1535,11 +1533,9 @@ public final class WindowInsets { public Builder setSystemWindowInsets(@NonNull Insets systemWindowInsets) { Objects.requireNonNull(systemWindowInsets); assignCompatInsets(mTypeInsetsMap, systemWindowInsets.toRect()); if (com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()) { // This should match the types used in assignCompatInsets. mCompatInsetTypes = STATUS_BARS | NAVIGATION_BARS; mCompatIgnoreVisibility = false; } mSystemInsetsConsumed = false; return this; } Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -51,17 +51,6 @@ flag { is_fixed_read_only: true } flag { name: "copy_compat_fields_of_window_insets" namespace: "windowing_frontend" description: "Copy mCompatInsetTypes and mCompatIgnoreVisibility from WindowInsets" bug: "409469172" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "close_to_square_config_includes_status_bar" namespace: "windowing_frontend" Loading core/tests/coretests/src/android/view/WindowInsetsTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import android.graphics.Insets; import android.graphics.Rect; Loading Loading @@ -173,7 +172,6 @@ public class WindowInsetsTest { @Test public void builder_copy_compatInsetTypes() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading @@ -192,7 +190,6 @@ public class WindowInsetsTest { @Test public void builder_copy_compatIgnoreVisibility() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading @@ -210,7 +207,6 @@ public class WindowInsetsTest { @Test public void builder_setSystemWindowInsets() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading Loading
core/java/android/view/WindowInsets.java +5 −9 Original line number Diff line number Diff line Loading @@ -1498,10 +1498,8 @@ public final class WindowInsets { mTypeInsetsMap = insets.mTypeInsetsMap.clone(); mTypeMaxInsetsMap = insets.mTypeMaxInsetsMap.clone(); mTypeVisibilityMap = insets.mTypeVisibilityMap.clone(); if (com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()) { mCompatInsetTypes = insets.mCompatInsetsTypes; mCompatIgnoreVisibility = insets.mCompatIgnoreVisibility; } mSystemInsetsConsumed = insets.mSystemWindowInsetsConsumed; mStableInsetsConsumed = insets.mStableInsetsConsumed; mDisplayCutout = displayCutoutCopyConstructorArgument(insets); Loading Loading @@ -1535,11 +1533,9 @@ public final class WindowInsets { public Builder setSystemWindowInsets(@NonNull Insets systemWindowInsets) { Objects.requireNonNull(systemWindowInsets); assignCompatInsets(mTypeInsetsMap, systemWindowInsets.toRect()); if (com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()) { // This should match the types used in assignCompatInsets. mCompatInsetTypes = STATUS_BARS | NAVIGATION_BARS; mCompatIgnoreVisibility = false; } mSystemInsetsConsumed = false; return this; } Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -51,17 +51,6 @@ flag { is_fixed_read_only: true } flag { name: "copy_compat_fields_of_window_insets" namespace: "windowing_frontend" description: "Copy mCompatInsetTypes and mCompatIgnoreVisibility from WindowInsets" bug: "409469172" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "close_to_square_config_includes_status_bar" namespace: "windowing_frontend" Loading
core/tests/coretests/src/android/view/WindowInsetsTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import android.graphics.Insets; import android.graphics.Rect; Loading Loading @@ -173,7 +172,6 @@ public class WindowInsetsTest { @Test public void builder_copy_compatInsetTypes() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading @@ -192,7 +190,6 @@ public class WindowInsetsTest { @Test public void builder_copy_compatIgnoreVisibility() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading @@ -210,7 +207,6 @@ public class WindowInsetsTest { @Test public void builder_setSystemWindowInsets() { assumeTrue(com.android.window.flags.Flags.copyCompatFieldsOfWindowInsets()); final Insets[] insets = new Insets[TYPES.length]; final Insets[] maxInsets = new Insets[TYPES.length]; final boolean[] visible = new boolean[TYPES.length]; Loading