diff options
author | Guang Zhu <guangzhu@google.com> | 2014-05-02 12:38:51 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2014-05-02 12:38:51 -0700 |
commit | fa9dc683f18e68cc1170c149a40c33a191444af1 (patch) | |
tree | 8df3cc4ee1d888f6d5280106f467b0187ffc6fd7 /core/tests | |
parent | 7f6ab17d414726868563105cd995b37dd519320b (diff) | |
download | frameworks_base-fa9dc683f18e68cc1170c149a40c33a191444af1.zip frameworks_base-fa9dc683f18e68cc1170c149a40c33a191444af1.tar.gz frameworks_base-fa9dc683f18e68cc1170c149a40c33a191444af1.tar.bz2 |
add getAddress function to return BT mac
Change-Id: Ib2bcd123e066672e411550856db862059949100e
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(); |