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

Commit 0c76ec2f authored by Charles Chen's avatar Charles Chen
Browse files

Remove the reparent_to_default_with_display_removal flag

Bug: 425306664
Test: atest WindowContextTest
Flag: EXEMPT remove flag
Change-Id: I3751ccf1dbb64501f0d54097027513cc84b4199b
parent b7effa88
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -98,11 +98,6 @@ public class WindowContext extends ContextWrapper implements WindowProvider,
        WindowTokenClient token = (WindowTokenClient) requireNonNull(getWindowContextToken());
        mController = new WindowContextController(requireNonNull(token));

        if (!Flags.reparentToDefaultWithDisplayRemoval()
                && shouldFallbackToDefaultDisplay(mOptions)) {
            throw new UnsupportedOperationException(
                    Flags.FLAG_REPARENT_TO_DEFAULT_WITH_DISPLAY_REMOVAL + " is not enabled");
        }
        Reference.reachabilityFence(this);
        if (android.view.accessibility.Flags.forceInvertColor()) {
            // Use the theme of the application as the default theme for this window context.
+0 −11
Original line number Diff line number Diff line
@@ -89,17 +89,6 @@ flag {
    bug: "407149510"
}

flag {
    namespace: "windowing_sdk"
    name: "reparent_to_default_with_display_removal"
    description: "Enable WindowContext to reparent to the default display with display detached"
    bug: "404532651"
    is_fixed_read_only: true
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    namespace: "windowing_sdk"
    name: "root_task_for_bubble"
+2 −8
Original line number Diff line number Diff line
@@ -561,19 +561,13 @@ public class WindowContextTest {
        }
    }

    @EnableFlags({
            Flags.FLAG_REPARENT_WINDOW_TOKEN_API,
            Flags.FLAG_REPARENT_TO_DEFAULT_WITH_DISPLAY_REMOVAL,
    })
    @EnableFlags(Flags.FLAG_REPARENT_WINDOW_TOKEN_API)
    @Test
    public void testDisplayRemovePolicyReparentToDefault_notAddWindow_reparent() {
        testDisplayRemovePolicyReparentToDefault(false /* shouldVerifyAddingView */);
    }

    @EnableFlags({
            Flags.FLAG_REPARENT_WINDOW_TOKEN_API,
            Flags.FLAG_REPARENT_TO_DEFAULT_WITH_DISPLAY_REMOVAL,
    })
    @EnableFlags(Flags.FLAG_REPARENT_WINDOW_TOKEN_API)
    @Test
    public void testDisplayRemovePolicyReparentToDefault_addWindow_reparent() {
        testDisplayRemovePolicyReparentToDefault(true /* shouldVerifyAddingView */);
+3 −10
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ import com.android.systemui.statusbar.phone.domain.interactor.ShadeDarkIconInter
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.ui.SystemBarUtilsState
import com.android.systemui.utils.windowmanager.WindowManagerProvider
import com.android.window.flags.Flags
import dagger.Module
import dagger.Provides
import dagger.multibindings.ClassKey
@@ -111,15 +110,9 @@ object ShadeDisplayAwareModule {
    @ShadeDisplayAware
    @SysUISingleton
    fun provideShadeContextBuildOptions(): Bundle? =
        if (Flags.reparentToDefaultWithDisplayRemoval()) {
        // Enables to reparent this WindowContext to the default display if the currently
        // attached display is removed.
            Bundle().apply {
                putBoolean(KEY_REPARENT_TO_DEFAULT_DISPLAY_WITH_DISPLAY_REMOVAL, true)
            }
        } else {
            null
        }
        Bundle().apply { putBoolean(KEY_REPARENT_TO_DEFAULT_DISPLAY_WITH_DISPLAY_REMOVAL, true) }

    @Provides
    @ShadeDisplayAware