ApexManager: Allow blocking Binder calls
When ApexManager switched from using ServiceManager.getService to using Binder.waitForService to retrieve apexservice, it lost the call to Binder.allowBlocking that was inside getService. Since ApexManager currently makes several synchronous binder calls, this call is needed to avoid Log.wtf()s. Bug: 153360345 Test: atest ApexManagerTest Change-Id: I6016477b20754a6dc0f31588bae4e679f08a1ba2
This commit is contained in:
@@ -399,7 +399,9 @@ public abstract class ApexManager {
|
||||
@VisibleForTesting
|
||||
protected IApexService waitForApexService() {
|
||||
try {
|
||||
return IApexService.Stub.asInterface(Binder.waitForService("apexservice"));
|
||||
// Since apexd is a trusted platform component, synchronized calls are allowable
|
||||
return IApexService.Stub.asInterface(
|
||||
Binder.allowBlocking(Binder.waitForService("apexservice")));
|
||||
} catch (RemoteException e) {
|
||||
throw new IllegalStateException("Required service apexservice not available");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user