summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2022-11-16 18:41:23 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2022-11-18 18:12:48 +0000
commitc39c0be88fb6d2ce34d78f19cc988079c131dd19 (patch)
tree2ffdd7a3a9ae114f598c91d26e1f1b8f81fabdc9
parent30f8af250315727e3cb02c3d0d2492abe6e8e341 (diff)
Revert "Expose ServiceManager.waitForService as system API."
This reverts commit ee13e8d435ec3abe821118827226db47e1d7fe53. Reason for revert: As discussed in b/233915142, an API that can obtain an arbitrary binder should not be exposed, and mainline modules should generally follow go/android-api-guidelines#the-moduleservicemanager-pattern. Bug: 233915142 Test: Presubmit Change-Id: I67e6e177d48ed213306aa0c10f83fe3b670daf1d
-rw-r--r--core/api/module-lib-current.txt1
-rw-r--r--core/java/android/os/ServiceManager.java2
2 files changed, 0 insertions, 3 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index 07af1d5f1634..b6e2d2a3e98b 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -360,7 +360,6 @@ package android.os {
method @NonNull public static String[] getDeclaredInstances(@NonNull String);
method public static boolean isDeclared(@NonNull String);
method @Nullable public static android.os.IBinder waitForDeclaredService(@NonNull String);
- method @Nullable public static android.os.IBinder waitForService(@NonNull String);
}
public class StatsServiceManager {
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index b6ff102b00b1..9ea42780981d 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -278,8 +278,6 @@ public final class ServiceManager {
* @return {@code null} only if there are permission problems or fatal errors.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
- @Nullable
public static IBinder waitForService(@NonNull String name) {
return Binder.allowBlocking(waitForServiceNative(name));
}