Merge "Merge "ServiceManager APIs for Remote Key Provisioning mainline module." am: 81c4fd8041 am: 0dda81576c" into tm-qpr-dev-plus-aosp am: 3966b14282

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

Change-Id: Icf1bde247713c6b71f3f235d4598b6693ed416ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Automerger Merge Worker
2022-11-14 22:25:29 +00:00
2 changed files with 4 additions and 1 deletions

View File

@@ -349,6 +349,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);
method @Nullable public static android.os.IBinder waitForService(@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();
}
}