Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c39c0be8 authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Revert "Expose ServiceManager.waitForService as system API."

This reverts commit ee13e8d4.

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
parent 30f8af25
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 {
+0 −2
Original line number Diff line number Diff line
@@ -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));
    }