summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Guang Zhu <guangzhu@google.com> 2014-05-03 00:32:58 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-05-03 00:32:58 +0000
commit1edfd835c2573711587cc77befeefd96083ccba5 (patch)
tree0f1275672e9a360e6bad769f570830a07dfbf8ce
parent106c24fbe35ccb1e60e638f9de0fe509c5921060 (diff)
parentfa9dc683f18e68cc1170c149a40c33a191444af1 (diff)
Merge "add getAddress function to return BT mac" into klp-modular-dev
-rw-r--r--core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java
index 0cd19f26e0a5..67203b261b47 100644
--- a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java
+++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java
@@ -64,6 +64,8 @@ public class BluetoothInstrumentation extends Instrumentation {
unpairAll();
} else if ("getName".equals(command)) {
getName();
+ } else if ("getAddress".equals(command)) {
+ getAddress();
} else {
finish(null);
}
@@ -90,6 +92,12 @@ public class BluetoothInstrumentation extends Instrumentation {
finish(mSuccessResult);
}
+ public void getAddress() {
+ String name = getBluetoothAdapter().getAddress();
+ mSuccessResult.putString("address", name);
+ finish(mSuccessResult);
+ }
+
public void finish(Bundle result) {
if (result == null) {
result = new Bundle();