diff options
-rw-r--r-- | framework/tests/src/android/bluetooth/BluetoothInstrumentation.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/tests/src/android/bluetooth/BluetoothInstrumentation.java b/framework/tests/src/android/bluetooth/BluetoothInstrumentation.java index 0cd19f26e0..67203b261b 100644 --- a/framework/tests/src/android/bluetooth/BluetoothInstrumentation.java +++ b/framework/tests/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(); |