summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2014-05-03 00:39:06 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-03 00:39:06 +0000
commitce63f59906ec0ef34ffd4f375c498e6367043e37 (patch)
treeef38b2e840a5ce515644afd5735d62304e80512d /core/tests
parent3feb0419d2d86c81e7592a5cd5a687291f583ecb (diff)
parent9284a37d601f8d90e868f6fb032ebb8b4e07029d (diff)
downloadframeworks_base-ce63f59906ec0ef34ffd4f375c498e6367043e37.zip
frameworks_base-ce63f59906ec0ef34ffd4f375c498e6367043e37.tar.gz
frameworks_base-ce63f59906ec0ef34ffd4f375c498e6367043e37.tar.bz2
am 9284a37d: am 1edfd835: Merge "add getAddress function to return BT mac" into klp-modular-dev
* commit '9284a37d601f8d90e868f6fb032ebb8b4e07029d': add getAddress function to return BT mac
Diffstat (limited to 'core/tests')
-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 0cd19f2..67203b2 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();