Merge " 2593833 AccessibilityManager not properly initialized immediately upon registration in the AccessibilityManagerService"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a3edb681ef
@@ -110,7 +110,7 @@ public final class AccessibilityManager {
|
||||
IBinder iBinder = ServiceManager.getService(Context.ACCESSIBILITY_SERVICE);
|
||||
mService = IAccessibilityManager.Stub.asInterface(iBinder);
|
||||
try {
|
||||
mService.addClient(mClient);
|
||||
mIsEnabled = mService.addClient(mClient);
|
||||
} catch (RemoteException re) {
|
||||
Log.e(LOG_TAG, "AccessibilityManagerService is dead", re);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import android.content.pm.ServiceInfo;
|
||||
*/
|
||||
interface IAccessibilityManager {
|
||||
|
||||
void addClient(IAccessibilityManagerClient client);
|
||||
boolean addClient(IAccessibilityManagerClient client);
|
||||
|
||||
boolean sendAccessibilityEvent(in AccessibilityEvent uiEvent);
|
||||
|
||||
|
||||
@@ -269,14 +269,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
||||
});
|
||||
}
|
||||
|
||||
public void addClient(IAccessibilityManagerClient client) {
|
||||
public boolean addClient(IAccessibilityManagerClient client) {
|
||||
synchronized (mLock) {
|
||||
try {
|
||||
client.setEnabled(mIsEnabled);
|
||||
mClients.add(client);
|
||||
} catch (RemoteException re) {
|
||||
Slog.w(LOG_TAG, "Dead AccessibilityManagerClient: " + client, re);
|
||||
}
|
||||
mClients.add(client);
|
||||
return mIsEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user