Merge "ServiceManager APIs for Remote Key Provisioning mainline module." am: 81c4fd8041

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2299820

Change-Id: Ifd1b61af5be088fcb6695110e73561f67a82052c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vikram Gaur
2022-11-14 21:09:08 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 1 deletions

View File

@@ -348,6 +348,7 @@ package android.os {
}
public final class ServiceManager {
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);
}

View File

@@ -258,12 +258,14 @@ public final class ServiceManager {
* waitForService should always be able to return the service.
* @hide
*/
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@NonNull
public static String[] getDeclaredInstances(@NonNull String iface) {
try {
return getIServiceManager().getDeclaredInstances(iface);
} catch (RemoteException e) {
Log.e(TAG, "error in getDeclaredInstances", e);
return null;
throw e.rethrowFromSystemServer();
}
}