summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2014-05-03 00:35:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-03 00:35:26 +0000
commit9284a37d601f8d90e868f6fb032ebb8b4e07029d (patch)
treee72b4dd2e536d3bf69ff0f1e25cd7e3712932c57 /core/tests
parente84f6b5a4ee22c1106bbf668a6d6853cfbde31d0 (diff)
parent1edfd835c2573711587cc77befeefd96083ccba5 (diff)
downloadframeworks_base-9284a37d601f8d90e868f6fb032ebb8b4e07029d.zip
frameworks_base-9284a37d601f8d90e868f6fb032ebb8b4e07029d.tar.gz
frameworks_base-9284a37d601f8d90e868f6fb032ebb8b4e07029d.tar.bz2
am 1edfd835: Merge "add getAddress function to return BT mac" into klp-modular-dev
* commit '1edfd835c2573711587cc77befeefd96083ccba5': 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();