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
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index 1e4dc7b..daf4bf2 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -399,7 +399,9 @@
         @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");
             }