Loading services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2527,7 +2527,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub final Display display = displays.get(i); if (display != null) { if (observingWindows) { mA11yWindowManager.startTrackingWindows(display.getDisplayId()); mA11yWindowManager.startTrackingWindows(display.getDisplayId(), mProxyManager.isProxyed(display.getDisplayId())); } else { mA11yWindowManager.stopTrackingWindows(display.getDisplayId()); } Loading services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java +4 −15 Original line number Diff line number Diff line Loading @@ -988,12 +988,15 @@ public class AccessibilityWindowManager { * * @param displayId The logical display id. */ public void startTrackingWindows(int displayId) { public void startTrackingWindows(int displayId, boolean proxyed) { synchronized (mLock) { DisplayWindowsObserver observer = mDisplayWindowsObservers.get(displayId); if (observer == null) { observer = new DisplayWindowsObserver(displayId); } if (proxyed && !observer.mIsProxy) { observer.mIsProxy = true; } if (observer.isTrackingWindowsLocked()) { return; } Loading @@ -1018,20 +1021,6 @@ public class AccessibilityWindowManager { } } /** * Starts tracking a display as belonging to a proxy. Creates the window observer if necessary. * @param displayId */ public void startTrackingDisplayProxy(int displayId) { startTrackingWindows(displayId); synchronized (mLock) { DisplayWindowsObserver observer = mDisplayWindowsObservers.get(displayId); if (observer != null) { observer.mIsProxy = true; } } } /** * Stops tracking a display as belonging to a proxy. * @param displayId Loading services/accessibility/java/com/android/server/accessibility/ProxyManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ public class ProxyManager { }; client.asBinder().linkToDeath(deathRecipient, 0); mA11yWindowManager.startTrackingDisplayProxy(displayId); // Notify apps that the service state has changed. // A11yManager#A11yServicesStateChangeListener synchronized (mLock) { Loading services/tests/servicestests/src/com/android/server/accessibility/AccessibilityWindowManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -1019,7 +1019,7 @@ public class AccessibilityWindowManagerTest { windowInfosForDisplay.get(DEFAULT_FOCUSED_INDEX).focused = true; } // Turns on windows tracking, and update window info. mA11yWindowManager.startTrackingWindows(displayId); mA11yWindowManager.startTrackingWindows(displayId, false); // Puts window lists into array. mWindowInfos.put(displayId, windowInfosForDisplay); // Sets the default display is the top focused display and Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2527,7 +2527,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub final Display display = displays.get(i); if (display != null) { if (observingWindows) { mA11yWindowManager.startTrackingWindows(display.getDisplayId()); mA11yWindowManager.startTrackingWindows(display.getDisplayId(), mProxyManager.isProxyed(display.getDisplayId())); } else { mA11yWindowManager.stopTrackingWindows(display.getDisplayId()); } Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java +4 −15 Original line number Diff line number Diff line Loading @@ -988,12 +988,15 @@ public class AccessibilityWindowManager { * * @param displayId The logical display id. */ public void startTrackingWindows(int displayId) { public void startTrackingWindows(int displayId, boolean proxyed) { synchronized (mLock) { DisplayWindowsObserver observer = mDisplayWindowsObservers.get(displayId); if (observer == null) { observer = new DisplayWindowsObserver(displayId); } if (proxyed && !observer.mIsProxy) { observer.mIsProxy = true; } if (observer.isTrackingWindowsLocked()) { return; } Loading @@ -1018,20 +1021,6 @@ public class AccessibilityWindowManager { } } /** * Starts tracking a display as belonging to a proxy. Creates the window observer if necessary. * @param displayId */ public void startTrackingDisplayProxy(int displayId) { startTrackingWindows(displayId); synchronized (mLock) { DisplayWindowsObserver observer = mDisplayWindowsObservers.get(displayId); if (observer != null) { observer.mIsProxy = true; } } } /** * Stops tracking a display as belonging to a proxy. * @param displayId Loading
services/accessibility/java/com/android/server/accessibility/ProxyManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ public class ProxyManager { }; client.asBinder().linkToDeath(deathRecipient, 0); mA11yWindowManager.startTrackingDisplayProxy(displayId); // Notify apps that the service state has changed. // A11yManager#A11yServicesStateChangeListener synchronized (mLock) { Loading
services/tests/servicestests/src/com/android/server/accessibility/AccessibilityWindowManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -1019,7 +1019,7 @@ public class AccessibilityWindowManagerTest { windowInfosForDisplay.get(DEFAULT_FOCUSED_INDEX).focused = true; } // Turns on windows tracking, and update window info. mA11yWindowManager.startTrackingWindows(displayId); mA11yWindowManager.startTrackingWindows(displayId, false); // Puts window lists into array. mWindowInfos.put(displayId, windowInfosForDisplay); // Sets the default display is the top focused display and Loading