Loading core/java/android/view/WindowManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -287,4 +287,9 @@ public abstract class WindowManagerInternal { * @return True if and only if the docked divider is currently in resize mode. */ public abstract boolean isDockedDividerResizing(); /** * Requests the window manager to recompute the windows for accessibility. */ public abstract void computeWindowsForAccessibility(); } services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +21 −3 Original line number Diff line number Diff line Loading @@ -426,6 +426,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { @Override public boolean sendAccessibilityEvent(AccessibilityEvent event, int userId) { boolean dispatchEvent = false; synchronized (mLock) { // We treat calls from a profile as if made by its parent as profiles // share the accessibility state of the parent. The call below Loading @@ -440,15 +442,31 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mSecurityPolicy.updateActiveAndAccessibilityFocusedWindowLocked(event.getWindowId(), event.getSourceNodeId(), event.getEventType(), event.getAction()); mSecurityPolicy.updateEventSourceLocked(event); notifyAccessibilityServicesDelayedLocked(event, false); notifyAccessibilityServicesDelayedLocked(event, true); dispatchEvent = true; } if (mHasInputFilter && mInputFilter != null) { mMainHandler.obtainMessage(MainHandler.MSG_SEND_ACCESSIBILITY_EVENT_TO_INPUT_FILTER, AccessibilityEvent.obtain(event)).sendToTarget(); } event.recycle(); } if (dispatchEvent) { // Make sure clients receiving this event will be able to get the // current state of the windows as the window manager may be delaying // the computation for performance reasons. if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED && mWindowsForAccessibilityCallback != null) { WindowManagerInternal wm = LocalServices.getService(WindowManagerInternal.class); wm.computeWindowsForAccessibility(); } synchronized (mLock) { notifyAccessibilityServicesDelayedLocked(event, false); notifyAccessibilityServicesDelayedLocked(event, true); } } event.recycle(); return (OWN_PROCESS_ID != Binder.getCallingPid()); } Loading services/core/java/com/android/server/wm/AccessibilityController.java +10 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ final class AccessibilityController { } } public void performComputeChangedWindowsNotLocked() { WindowsForAccessibilityObserver observer = null; synchronized (mWindowManagerService) { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); } } public void setMagnificationSpecLocked(MagnificationSpec spec) { if (mDisplayMagnifier != null) { mDisplayMagnifier.setMagnificationSpecLocked(spec); Loading services/core/java/com/android/server/wm/WindowManagerService.java +11 −0 Original line number Diff line number Diff line Loading @@ -11525,5 +11525,16 @@ public class WindowManagerService extends IWindowManager.Stub return getDefaultDisplayContentLocked().getDockedDividerController().isResizing(); } } @Override public void computeWindowsForAccessibility() { final AccessibilityController accessibilityController; synchronized (mWindowMap) { accessibilityController = mAccessibilityController; } if (accessibilityController != null) { accessibilityController.performComputeChangedWindowsNotLocked(); } } } } Loading
core/java/android/view/WindowManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -287,4 +287,9 @@ public abstract class WindowManagerInternal { * @return True if and only if the docked divider is currently in resize mode. */ public abstract boolean isDockedDividerResizing(); /** * Requests the window manager to recompute the windows for accessibility. */ public abstract void computeWindowsForAccessibility(); }
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +21 −3 Original line number Diff line number Diff line Loading @@ -426,6 +426,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { @Override public boolean sendAccessibilityEvent(AccessibilityEvent event, int userId) { boolean dispatchEvent = false; synchronized (mLock) { // We treat calls from a profile as if made by its parent as profiles // share the accessibility state of the parent. The call below Loading @@ -440,15 +442,31 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mSecurityPolicy.updateActiveAndAccessibilityFocusedWindowLocked(event.getWindowId(), event.getSourceNodeId(), event.getEventType(), event.getAction()); mSecurityPolicy.updateEventSourceLocked(event); notifyAccessibilityServicesDelayedLocked(event, false); notifyAccessibilityServicesDelayedLocked(event, true); dispatchEvent = true; } if (mHasInputFilter && mInputFilter != null) { mMainHandler.obtainMessage(MainHandler.MSG_SEND_ACCESSIBILITY_EVENT_TO_INPUT_FILTER, AccessibilityEvent.obtain(event)).sendToTarget(); } event.recycle(); } if (dispatchEvent) { // Make sure clients receiving this event will be able to get the // current state of the windows as the window manager may be delaying // the computation for performance reasons. if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED && mWindowsForAccessibilityCallback != null) { WindowManagerInternal wm = LocalServices.getService(WindowManagerInternal.class); wm.computeWindowsForAccessibility(); } synchronized (mLock) { notifyAccessibilityServicesDelayedLocked(event, false); notifyAccessibilityServicesDelayedLocked(event, true); } } event.recycle(); return (OWN_PROCESS_ID != Binder.getCallingPid()); } Loading
services/core/java/com/android/server/wm/AccessibilityController.java +10 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ final class AccessibilityController { } } public void performComputeChangedWindowsNotLocked() { WindowsForAccessibilityObserver observer = null; synchronized (mWindowManagerService) { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); } } public void setMagnificationSpecLocked(MagnificationSpec spec) { if (mDisplayMagnifier != null) { mDisplayMagnifier.setMagnificationSpecLocked(spec); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +11 −0 Original line number Diff line number Diff line Loading @@ -11525,5 +11525,16 @@ public class WindowManagerService extends IWindowManager.Stub return getDefaultDisplayContentLocked().getDockedDividerController().isResizing(); } } @Override public void computeWindowsForAccessibility() { final AccessibilityController accessibilityController; synchronized (mWindowMap) { accessibilityController = mAccessibilityController; } if (accessibilityController != null) { accessibilityController.performComputeChangedWindowsNotLocked(); } } } }