summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-10-31 21:15:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-10-31 21:15:31 +0000
commitc1616f68205ae760f4e6d7d1b0c8ff61bab04c84 (patch)
tree54d6cf4efcda07b6efaa864ba5085fc1f4d594d1 /core/java/android
parent834be811899ab0280a6a73d81c02b0106208ec1f (diff)
parentec5eb7e23d13c70443801d9b8caee5dcec66a951 (diff)
Merge "Reland "HIDL Java getService now the same as C++.""
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/HwBinder.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index 270e63f408a7..5e2a0815b60d 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -16,10 +16,10 @@
package android.os;
-import java.util.ArrayList;
-import java.util.NoSuchElementException;
import libcore.util.NativeAllocationRegistry;
+import java.util.NoSuchElementException;
+
/** @hide */
public abstract class HwBinder implements IHwBinder {
private static final String TAG = "HwBinder";
@@ -46,9 +46,16 @@ public abstract class HwBinder implements IHwBinder {
public native final void registerService(String serviceName)
throws RemoteException;
- public static native final IHwBinder getService(
+ public static final IHwBinder getService(
String iface,
String serviceName)
+ throws RemoteException, NoSuchElementException {
+ return getService(iface, serviceName, false /* retry */);
+ }
+ public static native final IHwBinder getService(
+ String iface,
+ String serviceName,
+ boolean retry)
throws RemoteException, NoSuchElementException;
public static native final void configureRpcThreadpool(