summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/UiAutomationConnection.java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-02-27 18:24:28 -0800
committerSvetoslav <svetoslavganov@google.com>2013-02-27 18:32:17 -0800
commit3c55e5c6595d28c64f5a760947c66fdefa2481e2 (patch)
treeb4e37137661ff97004653f50adb413664847fd16 /core/java/android/app/UiAutomationConnection.java
parent9ad665417713398524d425f63b0d6fa751244237 (diff)
downloadframeworks_base-3c55e5c6595d28c64f5a760947c66fdefa2481e2.tar.gz
frameworks_base-3c55e5c6595d28c64f5a760947c66fdefa2481e2.tar.bz2
frameworks_base-3c55e5c6595d28c64f5a760947c66fdefa2481e2.zip
Fake accessibility service used by UiAutomation not destroyed.
UiAutomation registers a fake accessibility service to introspect the screen. Upon the death of the shell process that started an instrumentation in which a UiAutomation resides the connection between the UiAutomation and the system is kept alive allowing the instrumentation to introspect the screen even after the death of the shell process. bug:8285905 Change-Id: I1a16d78abbea032116c4baed175cfc0d5dedbf0c
Diffstat (limited to 'core/java/android/app/UiAutomationConnection.java')
-rw-r--r--core/java/android/app/UiAutomationConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java
index 06ef4728814..97c7ff3ea86 100644
--- a/core/java/android/app/UiAutomationConnection.java
+++ b/core/java/android/app/UiAutomationConnection.java
@@ -49,6 +49,8 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
private final Object mLock = new Object();
+ private final Binder mToken = new Binder();
+
private int mInitialFrozenRotation = INITIAL_FROZEN_ROTATION_UNSPECIFIED;
private IAccessibilityServiceClient mClient;
@@ -164,7 +166,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
try {
// Calling out with a lock held is fine since if the system
// process is gone the client calling in will be killed.
- manager.registerUiTestAutomationService(client, info);
+ manager.registerUiTestAutomationService(mToken, client, info);
mClient = client;
} catch (RemoteException re) {
throw new IllegalStateException("Error while registering UiTestAutomationService.", re);