diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-06 12:11:45 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-06 12:17:56 -0700 |
| commit | 1ad0fd9c04ae2e352c59129b979145e662f25cbc (patch) | |
| tree | 65890c541c4020fdb35757ad67b85aebd055e2ce /services/java/com/android/server/accessibility/AccessibilityManagerService.java | |
| parent | f81dc4c08b2985ef369134b73e1b383b8284e912 (diff) | |
| parent | f772cba59760d1ad9eb5cb9205b2e2e9126e488d (diff) | |
| download | frameworks_base-1ad0fd9c04ae2e352c59129b979145e662f25cbc.zip frameworks_base-1ad0fd9c04ae2e352c59129b979145e662f25cbc.tar.gz frameworks_base-1ad0fd9c04ae2e352c59129b979145e662f25cbc.tar.bz2 | |
Merge "Accessibility active window not updated on time." into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server/accessibility/AccessibilityManagerService.java')
| -rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index 5e9e223..6782f5e 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -643,6 +643,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { return mSecurityPolicy.mActiveWindowId; } + void onTouchInteractionEnd() { + mSecurityPolicy.onTouchInteractionEnd(); + } + private void switchUser(int userId) { synchronized (mLock) { // The user switched so we do not need to restore the current user @@ -2178,16 +2182,24 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mActiveWindowId = windowId; } } break; - case AccessibilityEvent.TYPE_VIEW_HOVER_ENTER: - case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: { + case AccessibilityEvent.TYPE_VIEW_HOVER_ENTER: { mActiveWindowId = windowId; } break; - case AccessibilityEvent.TYPE_TOUCH_INTERACTION_END: { - mActiveWindowId = getFocusedWindowId(); - } break; } } + public void onTouchInteractionEnd() { + // We want to set the active window to be current immediately + // after the user has stopped touching the screen since if the + // user types with the IME he should get a feedback for the + // letter typed in the text view which is in the input focused + // window. Note that we always deliver hover accessibility events + // (they are a result of user touching the screen) so change of + // the active window before all hover accessibility events from + // the touched window are delivered is fine. + mActiveWindowId = getFocusedWindowId(); + } + public int getRetrievalAllowingWindowLocked() { return mActiveWindowId; } |
