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

Commit 0cfc94d5 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Put track of systemUiContext before WM behind flag" into main

parents 5de0446b 6d5ab397
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