Fixes in the accessibility gesture dispatching.

1. The gesture dispatcher thread was not waiting in a loop
   that check for complete initialization. Therefore is was
   susceptible to missed signals and unexpected interrupts.

2. In the gesture processing message handle the interaction id
   was reading the wrong message argument.

bug:5932640

Change-Id: Ic65ecc01a7fe7d43929c6c07d0759ae9001cf515
This commit is contained in:
Svetoslav Ganov
2012-04-20 14:57:11 -07:00
parent 5778626d9b
commit 8e2f41426c

View File

@@ -1007,10 +1007,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
synchronized (mGestureLock) {
Thread worker = new Thread(this, THREAD_NAME);
worker.start();
try {
mGestureLock.wait();
} catch (InterruptedException ie) {
/* ignore */
while (mHandler == null) {
try {
mGestureLock.wait();
} catch (InterruptedException ie) {
/* ignore */
}
}
}
}
@@ -1044,7 +1046,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
IAccessibilityServiceClient service =
(IAccessibilityServiceClient) message.obj;
final int gestureId = message.arg1;
final int interactionId = message.arg1;
final int interactionId = message.arg2;
try {
service.onGesture(gestureId, this, interactionId);