Split status bar window (1/N)
This is the first step to create another new window for status bar.
Small window => TYPE_STATUS_BAR: The bar on top of screen.
Large window => TYPE_NOTIFICATION_SHADE: Anything else.
Bug: 136993073
Test: build then flash
Test: atest WmTests SystemUITests
Test: atest RegisterStatusBarResultTest InsetsFlagsTest
Manual Test:
- Bouncer can show when leave showWhenLocked activity.
- StatusBar can show when comes HUN in fullscreen mode.
- StatusBar can play enter/leave animation in fullscreen mode.
- Able to drag notification panel when bubble/glow existing.
- Switch to market launcher, and run above tests.
- Drag notification panel from launcher several times and observe it
works fine.
Change-Id: Id9f72cd0e21f01b50d57f02ea60f97c6460926b7
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index f2ba97c..1637370 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -39,6 +39,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
@@ -139,6 +140,7 @@
mChildAppWindowAbove,
mDockedDividerWindow,
mStatusBarWindow,
+ mNotificationShadeWindow,
mNavBarWindow,
mImeWindow,
mImeDialogWindow));
@@ -161,6 +163,7 @@
mImeDialogWindow,
mDockedDividerWindow,
mStatusBarWindow,
+ mNotificationShadeWindow,
mNavBarWindow));
}
@@ -177,6 +180,7 @@
mImeDialogWindow,
mDockedDividerWindow,
mStatusBarWindow,
+ mNotificationShadeWindow,
mNavBarWindow));
}
@@ -193,6 +197,24 @@
mStatusBarWindow,
mImeWindow,
mImeDialogWindow,
+ mNotificationShadeWindow,
+ mNavBarWindow));
+ }
+
+ @Test
+ public void testForAllWindows_WithNotificationShadeImeTarget() throws Exception {
+ mDisplayContent.mInputMethodTarget = mNotificationShadeWindow;
+
+ assertForAllWindowsOrder(Arrays.asList(
+ mWallpaperWindow,
+ mChildAppWindowBelow,
+ mAppWindow,
+ mChildAppWindowAbove,
+ mDockedDividerWindow,
+ mStatusBarWindow,
+ mNotificationShadeWindow,
+ mImeWindow,
+ mImeDialogWindow,
mNavBarWindow));
}
@@ -211,6 +233,7 @@
mDockedDividerWindow,
voiceInteractionWindow,
mStatusBarWindow,
+ mNotificationShadeWindow,
mNavBarWindow,
mImeWindow,
mImeDialogWindow));
@@ -585,7 +608,7 @@
final WindowState window = createWindow(null /* parent */, TYPE_BASE_APPLICATION, dc, "w");
window.mActivityRecord.setOrientation(SCREEN_ORIENTATION_LANDSCAPE);
- final WindowState keyguard = createWindow(null, TYPE_STATUS_BAR, dc, "keyguard");
+ final WindowState keyguard = createWindow(null, TYPE_NOTIFICATION_SHADE , dc, "keyguard");
keyguard.mHasSurface = true;
keyguard.mAttrs.screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED;