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

Commit 22c47a67 authored by Chris Li's avatar Chris Li
Browse files

Clean up enableWmExtensionsForAllFlag

The flag has been in nextfood for almost a year.

Bug: 306666082
Test: Pass existing
Flag: EXEMPT Flag cleanup
Change-Id: If8a296546a8fae008798b1502f50568fdd1cd589
parent d8f585d4
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1531,15 +1531,6 @@ public interface WindowManager extends ViewManager {
     */
    @TestApi
    static boolean hasWindowExtensionsEnabled() {
        if (!Flags.enableWmExtensionsForAllFlag() && ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15) {
            // Since enableWmExtensionsForAllFlag, HAS_WINDOW_EXTENSIONS_ON_DEVICE is now true
            // on all devices by default as a build file property.
            // Until finishing flag ramp up, only return true when
            // ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15 is false, which is set per device by
            // OEMs.
            return false;
        }

        if (!HAS_WINDOW_EXTENSIONS_ON_DEVICE) {
            return false;
        }
+0 −8
Original line number Diff line number Diff line
@@ -53,14 +53,6 @@ flag {
    is_fixed_read_only: true
}

flag {
    namespace: "windowing_sdk"
    name: "enable_wm_extensions_for_all_flag"
    description: "Whether to enable WM Extensions for all devices"
    bug: "306666082"
    is_fixed_read_only: true
}

flag {
    namespace: "windowing_sdk"
    name: "activity_embedding_animation_customization_flag"
+2 −16
Original line number Diff line number Diff line
@@ -16,9 +16,6 @@

package android.view;

import static com.android.window.flags.Flags.FLAG_ENABLE_WM_EXTENSIONS_FOR_ALL_FLAG;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

@@ -47,19 +44,8 @@ public class WindowManagerTests {
    public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();

    @Test
    public void testHasWindowExtensionsEnabled_flagDisabled() {
        mSetFlagsRule.disableFlags(FLAG_ENABLE_WM_EXTENSIONS_FOR_ALL_FLAG);

        // Before FLAG_ENABLE_WM_EXTENSIONS_FOR_ALL_FLAG, Extensions are always bundled with AE.
        assertEquals(isActivityEmbeddingEnableForAll(),
                WindowManager.hasWindowExtensionsEnabled());
    }

    @Test
    public void testHasWindowExtensionsEnabled_flagEnabled() {
        mSetFlagsRule.enableFlags(FLAG_ENABLE_WM_EXTENSIONS_FOR_ALL_FLAG);

        // Extensions should be enabled on all devices.
    public void testHasWindowExtensionsEnabled() {
        // Extensions should be enabled on all phones/tablets.
        assertTrue(WindowManager.hasWindowExtensionsEnabled());
    }