Loading services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +5 −2 Original line number Diff line number Diff line Loading @@ -701,6 +701,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub public int addAccessibilityInteractionConnection(IWindow windowToken, IAccessibilityInteractionConnection connection, String packageName, int userId) throws RemoteException { final int windowId; 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 @@ -713,7 +714,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub packageName = mSecurityPolicy.resolveValidReportedPackageLocked( packageName, UserHandle.getCallingAppId(), resolvedUserId); final int windowId = sNextWindowId++; windowId = sNextWindowId++; // If the window is from a process that runs across users such as // the system UI or the system we add it to the global state that // is shared across users. Loading Loading @@ -741,8 +742,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub + " and token: " + windowToken.asBinder()); } } return windowId; } WindowManagerInternal wm = LocalServices.getService(WindowManagerInternal.class); wm.computeWindowsForAccessibility(); return windowId; } @Override Loading services/core/java/com/android/server/wm/AccessibilityController.java +35 −28 Original line number Diff line number Diff line Loading @@ -119,13 +119,13 @@ final class AccessibilityController { } } public void performComputeChangedWindowsNotLocked() { public void performComputeChangedWindowsNotLocked(boolean forceSend) { WindowsForAccessibilityObserver observer = null; synchronized (mService) { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); observer.performComputeChangedWindowsNotLocked(forceSend); } } Loading Loading @@ -193,7 +193,7 @@ final class AccessibilityController { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); observer.performComputeChangedWindowsNotLocked(false); } } Loading Loading @@ -1011,12 +1011,12 @@ final class AccessibilityController { mHandler = new MyHandler(mService.mH.getLooper()); mRecurringAccessibilityEventsIntervalMillis = ViewConfiguration .getSendRecurringAccessibilityEventsInterval(); computeChangedWindows(); computeChangedWindows(true); } public void performComputeChangedWindowsNotLocked() { public void performComputeChangedWindowsNotLocked(boolean forceSend) { mHandler.removeMessages(MyHandler.MESSAGE_COMPUTE_CHANGED_WINDOWS); computeChangedWindows(); computeChangedWindows(forceSend); } public void scheduleComputeChangedWindowsLocked() { Loading @@ -1026,7 +1026,12 @@ final class AccessibilityController { } } public void computeChangedWindows() { /** * Check if windows have changed, and send them to the accessibilty subsystem if they have. * * @param forceSend Send the windows the accessibility even if they haven't changed. */ public void computeChangedWindows(boolean forceSend) { if (DEBUG) { Slog.i(LOG_TAG, "computeChangedWindows()"); } Loading Loading @@ -1171,6 +1176,7 @@ final class AccessibilityController { visibleWindows.clear(); addedWindows.clear(); if (!forceSend) { // We computed the windows and if they changed notify the client. if (mOldWindows.size() != windows.size()) { // Different size means something changed. Loading @@ -1191,16 +1197,17 @@ final class AccessibilityController { } } } } if (windowsChanged) { if (forceSend || windowsChanged) { cacheWindows(windows); } } // Now we do not hold the lock, so send the windows over. if (windowsChanged) { if (forceSend || windowsChanged) { if (DEBUG) { Log.i(LOG_TAG, "Windows changed:" + windows); Log.i(LOG_TAG, "Windows changed or force sending:" + windows); } mCallback.onWindowsForAccessibilityChanged(windows); } else { Loading Loading @@ -1345,7 +1352,7 @@ final class AccessibilityController { public void handleMessage(Message message) { switch (message.what) { case MESSAGE_COMPUTE_CHANGED_WINDOWS: { computeChangedWindows(); computeChangedWindows(false); } break; } } Loading services/core/java/com/android/server/wm/WindowManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ public abstract class WindowManagerInternal { public abstract boolean isDockedDividerResizing(); /** * Requests the window manager to recompute the windows for accessibility. * Requests the window manager to resend the windows for accessibility. */ public abstract void computeWindowsForAccessibility(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7422,7 +7422,7 @@ public class WindowManagerService extends IWindowManager.Stub accessibilityController = mAccessibilityController; } if (accessibilityController != null) { accessibilityController.performComputeChangedWindowsNotLocked(); accessibilityController.performComputeChangedWindowsNotLocked(true); } } Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +5 −2 Original line number Diff line number Diff line Loading @@ -701,6 +701,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub public int addAccessibilityInteractionConnection(IWindow windowToken, IAccessibilityInteractionConnection connection, String packageName, int userId) throws RemoteException { final int windowId; 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 @@ -713,7 +714,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub packageName = mSecurityPolicy.resolveValidReportedPackageLocked( packageName, UserHandle.getCallingAppId(), resolvedUserId); final int windowId = sNextWindowId++; windowId = sNextWindowId++; // If the window is from a process that runs across users such as // the system UI or the system we add it to the global state that // is shared across users. Loading Loading @@ -741,8 +742,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub + " and token: " + windowToken.asBinder()); } } return windowId; } WindowManagerInternal wm = LocalServices.getService(WindowManagerInternal.class); wm.computeWindowsForAccessibility(); return windowId; } @Override Loading
services/core/java/com/android/server/wm/AccessibilityController.java +35 −28 Original line number Diff line number Diff line Loading @@ -119,13 +119,13 @@ final class AccessibilityController { } } public void performComputeChangedWindowsNotLocked() { public void performComputeChangedWindowsNotLocked(boolean forceSend) { WindowsForAccessibilityObserver observer = null; synchronized (mService) { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); observer.performComputeChangedWindowsNotLocked(forceSend); } } Loading Loading @@ -193,7 +193,7 @@ final class AccessibilityController { observer = mWindowsForAccessibilityObserver; } if (observer != null) { observer.performComputeChangedWindowsNotLocked(); observer.performComputeChangedWindowsNotLocked(false); } } Loading Loading @@ -1011,12 +1011,12 @@ final class AccessibilityController { mHandler = new MyHandler(mService.mH.getLooper()); mRecurringAccessibilityEventsIntervalMillis = ViewConfiguration .getSendRecurringAccessibilityEventsInterval(); computeChangedWindows(); computeChangedWindows(true); } public void performComputeChangedWindowsNotLocked() { public void performComputeChangedWindowsNotLocked(boolean forceSend) { mHandler.removeMessages(MyHandler.MESSAGE_COMPUTE_CHANGED_WINDOWS); computeChangedWindows(); computeChangedWindows(forceSend); } public void scheduleComputeChangedWindowsLocked() { Loading @@ -1026,7 +1026,12 @@ final class AccessibilityController { } } public void computeChangedWindows() { /** * Check if windows have changed, and send them to the accessibilty subsystem if they have. * * @param forceSend Send the windows the accessibility even if they haven't changed. */ public void computeChangedWindows(boolean forceSend) { if (DEBUG) { Slog.i(LOG_TAG, "computeChangedWindows()"); } Loading Loading @@ -1171,6 +1176,7 @@ final class AccessibilityController { visibleWindows.clear(); addedWindows.clear(); if (!forceSend) { // We computed the windows and if they changed notify the client. if (mOldWindows.size() != windows.size()) { // Different size means something changed. Loading @@ -1191,16 +1197,17 @@ final class AccessibilityController { } } } } if (windowsChanged) { if (forceSend || windowsChanged) { cacheWindows(windows); } } // Now we do not hold the lock, so send the windows over. if (windowsChanged) { if (forceSend || windowsChanged) { if (DEBUG) { Log.i(LOG_TAG, "Windows changed:" + windows); Log.i(LOG_TAG, "Windows changed or force sending:" + windows); } mCallback.onWindowsForAccessibilityChanged(windows); } else { Loading Loading @@ -1345,7 +1352,7 @@ final class AccessibilityController { public void handleMessage(Message message) { switch (message.what) { case MESSAGE_COMPUTE_CHANGED_WINDOWS: { computeChangedWindows(); computeChangedWindows(false); } break; } } Loading
services/core/java/com/android/server/wm/WindowManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ public abstract class WindowManagerInternal { public abstract boolean isDockedDividerResizing(); /** * Requests the window manager to recompute the windows for accessibility. * Requests the window manager to resend the windows for accessibility. */ public abstract void computeWindowsForAccessibility(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7422,7 +7422,7 @@ public class WindowManagerService extends IWindowManager.Stub accessibilityController = mAccessibilityController; } if (accessibilityController != null) { accessibilityController.performComputeChangedWindowsNotLocked(); accessibilityController.performComputeChangedWindowsNotLocked(true); } } Loading