aboutsummaryrefslogtreecommitdiffstats
path: root/java/BluetoothManager.java
diff options
context:
space:
mode:
authorAndrei Vasiliu <[email protected]>2016-02-03 18:24:03 +0200
committerAndrei Vasiliu <[email protected]>2016-02-04 18:37:14 +0200
commit192a362c475bcfd501794a1f97222bd68c576ccf (patch)
tree95b6f304d3ab213164f7a009285ef8371be57195 /java/BluetoothManager.java
parent2367610971f5f8231d365c4c126948557d0d73da (diff)
jni: Implemented getObject* functions and added defensive checks
Signed-off-by: Andrei Vasiliu <[email protected]>
Diffstat (limited to 'java/BluetoothManager.java')
-rw-r--r--java/BluetoothManager.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/java/BluetoothManager.java b/java/BluetoothManager.java
index 1e3d06d..9de5a84 100644
--- a/java/BluetoothManager.java
+++ b/java/BluetoothManager.java
@@ -41,9 +41,19 @@ public class BluetoothManager
}
public native BluetoothType getBluetoothType();
- public native BluetoothObject getObject(BluetoothType type, String name,
+
+ public BluetoothObject getObject(BluetoothType type, String name,
+ String identifier, BluetoothObject parent) {
+ return getObject(type.ordinal(), name, identifier, parent);
+ }
+ private native BluetoothObject getObject(int type, String name,
String identifier, BluetoothObject parent);
- public native List<BluetoothObject> getObjects(BluetoothType type, String name,
+
+ public List<BluetoothObject> getObjects(BluetoothType type, String name,
+ String identifier, BluetoothObject parent) {
+ return getObjects(type.ordinal(), name, identifier, parent);
+ }
+ private native List<BluetoothObject> getObjects(int type, String name,
String identifier, BluetoothObject parent);
/** Returns a list of BluetoothAdapters available in the system