summaryrefslogtreecommitdiff
path: root/core/java/android/os/ServiceManager.java
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-08-10 16:31:37 -0700
committerSteven Moreland <smoreland@google.com>2021-08-11 17:16:32 +0000
commitd247e417a24cf13c95ff9c50110a077de0ef6a3e (patch)
treef4980024b4563df4190ede65a124bf7aa65aa023 /core/java/android/os/ServiceManager.java
parent7ad87a83da694af0a424ae7d3d49a14515482805 (diff)
ServiceManager: waitForService uses allowBlocking
For parity with getService and checkService. Bug: 194806512 Test: boot Change-Id: Iecc3f1c6d6ae9bee94252281b416d62f3bf30afd
Diffstat (limited to 'core/java/android/os/ServiceManager.java')
-rw-r--r--core/java/android/os/ServiceManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index f853e67f87d0..f7d7b21cb598 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -257,7 +257,12 @@ public final class ServiceManager {
*
* @return {@code null} only if there are permission problems or fatal errors.
*/
- public static native IBinder waitForService(@NonNull String name);
+ public static IBinder waitForService(@NonNull String name) {
+ return Binder.allowBlocking(waitForServiceNative(name));
+ }
+
+ private static native IBinder waitForServiceNative(@NonNull String name);
+
/**
* Returns the specified service from the service manager, if declared.