Merge "Expose ServiceManager.waitForService as system API."
This commit is contained in:
committed by
Android (Google) Code Review
commit
735cccf341
@@ -358,6 +358,7 @@ package android.os {
|
||||
public final class ServiceManager {
|
||||
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 {
|
||||
|
||||
@@ -276,6 +276,8 @@ 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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user