Accessibility: Sometimes cannot interact with nav bar items. automerge: 10a053e
automerge: db1983b
* commit 'db1983b3f43e86acbf188961f53af794cce05219':
Accessibility: Sometimes cannot interact with nav bar items.
This commit is contained in:
@@ -765,16 +765,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the bounds of the active window.
|
* Gets the bounds of a window.
|
||||||
*
|
*
|
||||||
* @param outBounds The output to which to write the bounds.
|
* @param outBounds The output to which to write the bounds.
|
||||||
*/
|
*/
|
||||||
boolean getActiveWindowBounds(Rect outBounds) {
|
boolean getWindowBounds(int windowId, Rect outBounds) {
|
||||||
// TODO: This should be refactored to work with accessibility
|
|
||||||
// focus in multiple windows.
|
|
||||||
IBinder token;
|
IBinder token;
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
final int windowId = mSecurityPolicy.mActiveWindowId;
|
|
||||||
token = mGlobalWindowTokens.get(windowId);
|
token = mGlobalWindowTokens.get(windowId);
|
||||||
if (token == null) {
|
if (token == null) {
|
||||||
token = getCurrentUserStateLocked().mWindowTokens.get(windowId);
|
token = getCurrentUserStateLocked().mWindowTokens.get(windowId);
|
||||||
@@ -3255,7 +3252,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
|
|
||||||
// Make sure the point is within the window.
|
// Make sure the point is within the window.
|
||||||
Rect windowBounds = mTempRect;
|
Rect windowBounds = mTempRect;
|
||||||
getActiveWindowBounds(windowBounds);
|
getWindowBounds(focus.getWindowId(), windowBounds);
|
||||||
if (!windowBounds.contains(point.x, point.y)) {
|
if (!windowBounds.contains(point.x, point.y)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user