diff options
author | Guang Zhu <guangzhu@google.com> | 2014-05-03 00:35:26 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-03 00:35:26 +0000 |
commit | 9284a37d601f8d90e868f6fb032ebb8b4e07029d (patch) | |
tree | e72b4dd2e536d3bf69ff0f1e25cd7e3712932c57 /core/tests | |
parent | e84f6b5a4ee22c1106bbf668a6d6853cfbde31d0 (diff) | |
parent | 1edfd835c2573711587cc77befeefd96083ccba5 (diff) | |
download | frameworks_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.java | 8 |
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(); |