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

Commit 6d5ab397 authored by Chris Li's avatar Chris Li
Browse files

Put track of systemUiContext before WM behind flag

Put fix I705a5212c36f99b00073f2609b70673476dc50de behind flag since it
has side effect.

Bug: 384428048
Bug: 380777677
Test: atest FrameworksCoreTests:WindowTokenClientControllerTest
Flag: com.android.window.flags.track_system_ui_context_before_wms
Change-Id: Ieb32cae2aee5865bd7b573ebd0e800cc7e8b3d25
parent 94269cc0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.view.WindowManagerGlobal;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.window.flags.Flags;

/**
 * Singleton controller to manage the attached {@link WindowTokenClient}s, and to dispatch
@@ -137,7 +138,9 @@ public class WindowTokenClientController {
            // is initialized later, the SystemUiContext will start reporting from
            // DisplayContent#registerSystemUiContext, and WindowTokenClientController can report
            // the Configuration to the correct client.
            if (Flags.trackSystemUiContextBeforeWms()) {
                recordWindowContextToken(client);
            }
            return false;
        }
        final WindowContextInfo info;
+8 −0
Original line number Diff line number Diff line
@@ -33,11 +33,15 @@ import android.app.ActivityThread;
import android.content.res.Configuration;
import android.os.IBinder;
import android.os.RemoteException;
import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
import android.platform.test.flag.junit.SetFlagsRule;
import android.view.IWindowManager;

import androidx.test.filters.SmallTest;

import com.android.window.flags.Flags;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -58,6 +62,9 @@ public class WindowTokenClientControllerTest {
    @Rule
    public final MockitoRule mockito = MockitoJUnit.rule();

    @Rule
    public SetFlagsRule setFlagsRule = new SetFlagsRule();

    @Mock
    private IWindowManager mWindowManagerService;
    @Mock
@@ -161,6 +168,7 @@ public class WindowTokenClientControllerTest {
        verify(mWindowManagerService).detachWindowContext(mWindowTokenClient);
    }

    @EnableFlags(Flags.FLAG_TRACK_SYSTEM_UI_CONTEXT_BEFORE_WMS)
    @Test
    public void testAttachToDisplayContent_keepTrackWithoutWMS() {
        // WMS is not initialized