Always show window divider to accessibility

Accessibility typically can only see windows that the user
can interact with. This CL carves out the split-screen
divider as an exception. The reason is that services can
use the presence of the split-screen divider to know if the
device is in split-screen mode. But the divider becomes
non-touchable if an IME appears in split-screen mode.

Services like TalkBack need some way to tell for sure that
they are in split-screen mode. Absent a new API for them
to query, simply making sure they can see the divider seems
like the simplest way to provide this.

Bug: 28768841
Test: A11y service CTS
Change-Id: I92b89c842689e4c4c69a732490150ca032de46cc
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index 2bda80d..163b160 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -16,6 +16,7 @@
 
 package com.android.server.wm;
 
+import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
 import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
 
@@ -1068,8 +1069,11 @@
                         continue;
                     }
 
-                    // If the window is not touchable - ignore.
-                    if ((flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) {
+                    // Ignore non-touchable windows, except the split-screen divider, which is
+                    // occasionally non-touchable but still useful for identifying split-screen
+                    // mode.
+                    if (((flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0)
+                            && (windowState.mAttrs.type != TYPE_DOCK_DIVIDER)) {
                         continue;
                     }