144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale/*
244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * Copyright (C) 2016 The Android Open Source Project
344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *
444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * Licensed under the Apache License, Version 2.0 (the "License");
544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * you may not use this file except in compliance with the License.
644fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * You may obtain a copy of the License at
744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *
844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *      http://www.apache.org/licenses/LICENSE-2.0
944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *
1044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * Unless required by applicable law or agreed to in writing, software
1144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * distributed under the License is distributed on an "AS IS" BASIS,
1244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * See the License for the specific language governing permissions and
1444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * limitations under the License
1544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale */
1644fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
1744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwalepackage com.android.server.wm;
1844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
1944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport org.junit.Test;
2044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport org.junit.runner.RunWith;
2144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
2244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport android.platform.test.annotations.Presubmit;
2344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport android.support.test.filters.SmallTest;
2444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport android.support.test.runner.AndroidJUnit4;
2544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
268347163dbb64fb61012c0393163283106a0a351eWinson Chungimport static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;
278347163dbb64fb61012c0393163283106a0a351eWinson Chungimport static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
288347163dbb64fb61012c0393163283106a0a351eWinson Chungimport static android.app.ActivityManager.StackId.PINNED_STACK_ID;
2944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
30ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwaleimport static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
3144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
3244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwaleimport static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
3344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
3444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale/**
3544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * Tests for the {@link WindowLayersController} class.
3644fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *
3744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale * Build/Install/Run:
3844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale *  bit FrameworksServicesTests:com.android.server.wm.WindowLayersControllerTests
3944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale */
4044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale@SmallTest
4144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale@Presubmit
4244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale@RunWith(AndroidJUnit4.class)
4344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwalepublic class WindowLayersControllerTests extends WindowTestsBase {
4444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
4544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    @Test
4644fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    public void testAssignWindowLayers_ForImeWithNoTarget() throws Exception {
4744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        sWm.mInputMethodTarget = null;
4811cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
4944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
5044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // The Ime has an higher base layer than app windows and lower base layer than system
5144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // windows, so it should be above app windows and below system windows if there isn't an IME
5244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // target.
5311cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mChildAppWindowAbove);
5411cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mAppWindow);
5511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mDockedDividerWindow);
5611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mNavBarWindow, mImeWindow);
5711cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mStatusBarWindow, mImeWindow);
5844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
5944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // And, IME dialogs should always have an higher layer than the IME.
6011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeDialogWindow, mImeWindow);
6144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    }
6244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
6344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    @Test
6444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    public void testAssignWindowLayers_ForImeWithAppTarget() throws Exception {
6544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        final WindowState imeAppTarget =
6611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "imeAppTarget");
6744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        sWm.mInputMethodTarget = imeAppTarget;
6811cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
6944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
7044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // Ime should be above all app windows and below system windows if it is targeting an app
7144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // window.
7211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, imeAppTarget);
7311cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mChildAppWindowAbove);
7411cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mAppWindow);
7511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mDockedDividerWindow);
7611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mNavBarWindow, mImeWindow);
7711cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mStatusBarWindow, mImeWindow);
7844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
7944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // And, IME dialogs should always have an higher layer than the IME.
8011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeDialogWindow, mImeWindow);
8144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    }
8244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
8344fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    @Test
84ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    public void testAssignWindowLayers_ForImeWithAppTargetWithChildWindows() throws Exception {
85ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState imeAppTarget =
8611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "imeAppTarget");
87ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState imeAppTargetChildAboveWindow = createWindow(imeAppTarget,
88ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale                TYPE_APPLICATION_ATTACHED_DIALOG, imeAppTarget.mToken,
89ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale                "imeAppTargetChildAboveWindow");
90ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState imeAppTargetChildBelowWindow = createWindow(imeAppTarget,
91ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale                TYPE_APPLICATION_MEDIA_OVERLAY, imeAppTarget.mToken,
92ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale                "imeAppTargetChildBelowWindow");
93ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
94ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        sWm.mInputMethodTarget = imeAppTarget;
9511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
96ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
97ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // Ime should be above all app windows except for child windows that are z-ordered above it
98ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // and below system windows if it is targeting an app window.
9911cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, imeAppTarget);
10011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(imeAppTargetChildAboveWindow, mImeWindow);
10111cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, imeAppTargetChildBelowWindow);
10211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mChildAppWindowAbove);
10311cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mAppWindow);
10411cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mDockedDividerWindow);
10511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mNavBarWindow, mImeWindow);
10611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mStatusBarWindow, mImeWindow);
107ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
108ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // And, IME dialogs should always have an higher layer than the IME.
10911cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeDialogWindow, mImeWindow);
110ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    }
111ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
112ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    @Test
113ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    public void testAssignWindowLayers_ForImeWithAppTargetAndAppAbove() throws Exception {
114ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState appBelowImeTarget =
11511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "appBelowImeTarget");
116ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState imeAppTarget =
11711cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "imeAppTarget");
118ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        final WindowState appAboveImeTarget =
11911cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "appAboveImeTarget");
120ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
121ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        sWm.mInputMethodTarget = imeAppTarget;
12211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
123ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
124ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // Ime should be above all app windows except for non-fullscreen app window above it and
125ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // below system windows if it is targeting an app window.
12611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, imeAppTarget);
12711cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, appBelowImeTarget);
12811cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(appAboveImeTarget, mImeWindow);
12911cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mChildAppWindowAbove);
13011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mAppWindow);
13111cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mDockedDividerWindow);
13211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mNavBarWindow, mImeWindow);
13311cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mStatusBarWindow, mImeWindow);
134ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
135ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale        // And, IME dialogs should always have an higher layer than the IME.
13611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeDialogWindow, mImeWindow);
137ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    }
138ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale
139ca9e061256861a86d7d1c2770c666451d3fb53deWale Ogunwale    @Test
14044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    public void testAssignWindowLayers_ForImeNonAppImeTarget() throws Exception {
14117f175ca1a75d5a4864b88126f5d2a59935d52fdWale Ogunwale        final WindowState imeSystemOverlayTarget = createWindow(null, TYPE_SYSTEM_OVERLAY,
14211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                mDisplayContent, "imeSystemOverlayTarget",
14317f175ca1a75d5a4864b88126f5d2a59935d52fdWale Ogunwale                true /* ownerCanAddInternalSystemWindow */);
14444fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
14544fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        sWm.mInputMethodTarget = imeSystemOverlayTarget;
14611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
14744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
14844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // The IME target base layer is higher than all window except for the nav bar window, so the
14944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // IME should be above all windows except for the nav bar.
15011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, imeSystemOverlayTarget);
15111cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mChildAppWindowAbove);
15211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mAppWindow);
15311cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mDockedDividerWindow);
15411cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeWindow, mStatusBarWindow);
15511cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mNavBarWindow, mImeWindow);
15644fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
15744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        // And, IME dialogs should always have an higher layer than the IME.
15811cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(mImeDialogWindow, mImeWindow);
15944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    }
16044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
1618347163dbb64fb61012c0393163283106a0a351eWinson Chung    @Test
1628347163dbb64fb61012c0393163283106a0a351eWinson Chung    public void testStackLayers() throws Exception {
1638347163dbb64fb61012c0393163283106a0a351eWinson Chung        WindowState pinnedStackWindow = createWindowOnStack(null, PINNED_STACK_ID,
16411cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                TYPE_BASE_APPLICATION, mDisplayContent, "pinnedStackWindow");
1658347163dbb64fb61012c0393163283106a0a351eWinson Chung        WindowState dockedStackWindow = createWindowOnStack(null, DOCKED_STACK_ID,
16611cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                TYPE_BASE_APPLICATION, mDisplayContent, "dockedStackWindow");
1678347163dbb64fb61012c0393163283106a0a351eWinson Chung        WindowState assistantStackWindow = createWindowOnStack(null, ASSISTANT_STACK_ID,
16811cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale                TYPE_BASE_APPLICATION, mDisplayContent, "assistantStackWindow");
1698347163dbb64fb61012c0393163283106a0a351eWinson Chung
17011cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        mLayersController.assignWindowLayers(mDisplayContent);
1718347163dbb64fb61012c0393163283106a0a351eWinson Chung
17211cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1Wale Ogunwale        assertWindowLayerGreaterThan(dockedStackWindow, mAppWindow);
1738347163dbb64fb61012c0393163283106a0a351eWinson Chung        assertWindowLayerGreaterThan(assistantStackWindow, dockedStackWindow);
1748347163dbb64fb61012c0393163283106a0a351eWinson Chung        assertWindowLayerGreaterThan(pinnedStackWindow, assistantStackWindow);
1758347163dbb64fb61012c0393163283106a0a351eWinson Chung    }
1768347163dbb64fb61012c0393163283106a0a351eWinson Chung
17744fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    private void assertWindowLayerGreaterThan(WindowState first, WindowState second)
17844fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale            throws Exception {
17944fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale        assertGreaterThan(first.mWinAnimator.mAnimLayer, second.mWinAnimator.mAnimLayer);
18044fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale    }
18144fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale
18244fbdf5b1e13398e35d4bafb7236d194a51ee7afWale Ogunwale}
183