Merge "ApexManager: Allow blocking Binder calls" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-09 15:20:04 +00:00
committed by Android (Google) Code Review

View File

@@ -399,7 +399,9 @@ public abstract class ApexManager {
@VisibleForTesting @VisibleForTesting
protected IApexService waitForApexService() { protected IApexService waitForApexService() {
try { 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) { } catch (RemoteException e) {
throw new IllegalStateException("Required service apexservice not available"); throw new IllegalStateException("Required service apexservice not available");
} }