Merge "Accessibility layer in inconsistent state after running UI test automation tests." into jb-mr1-dev

This commit is contained in:
Svetoslav Ganov
2012-10-25 11:09:01 -07:00
committed by Android (Google) Code Review

View File

@@ -558,8 +558,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
public void unregisterUiTestAutomationService(IAccessibilityServiceClient serviceClient) {
synchronized (mLock) {
// Automation service is not bound, so pretend it died to perform clean up.
if (mUiAutomationService != null
&& mUiAutomationService.mServiceInterface == serviceClient) {
if (mUiAutomationService != null && mUiAutomationService.mServiceInterface != null
&& serviceClient != null && mUiAutomationService.mServiceInterface
.asBinder() == serviceClient.asBinder()) {
mUiAutomationService.binderDied();
}
}