diff options
author | Guang Zhu <guangzhu@google.com> | 2014-07-17 20:24:56 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2014-07-17 20:24:56 -0700 |
commit | 946f207d3d7e8e6d467782b549aa80073a68fae8 (patch) | |
tree | dc5660ec595c55c7cc45306cf3936f0de04ae40b /core/tests/bluetoothtests | |
parent | 65d7c332d7b613f23a26066051cc7496e0efa994 (diff) | |
download | frameworks_base-946f207d3d7e8e6d467782b549aa80073a68fae8.zip frameworks_base-946f207d3d7e8e6d467782b549aa80073a68fae8.tar.gz frameworks_base-946f207d3d7e8e6d467782b549aa80073a68fae8.tar.bz2 |
add command to enable bt snoop log
Change-Id: I22a6482a90c2bb976a5ce44946e9f0fb8b59e6b2
Diffstat (limited to 'core/tests/bluetoothtests')
-rw-r--r-- | core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java index 22dce39..411a3f8 100644 --- a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java +++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java @@ -20,6 +20,8 @@ import android.app.Instrumentation; import android.content.Context; import android.os.Bundle; +import junit.framework.Assert; + import java.util.Set; public class BluetoothInstrumentation extends Instrumentation { @@ -70,6 +72,8 @@ public class BluetoothInstrumentation extends Instrumentation { getAddress(); } else if ("getBondedDevices".equals(command)) { getBondedDevices(); + } else if ("enableBtSnoop".equals(command)) { + enableBtSnoop(); } else { finish(null); } @@ -112,6 +116,12 @@ public class BluetoothInstrumentation extends Instrumentation { finish(mSuccessResult); } + public void enableBtSnoop() { + Assert.assertTrue("failed to enable snoop log", + getBluetoothAdapter().configHciSnoopLog(true)); + finish(mSuccessResult); + } + public void finish(Bundle result) { if (result == null) { result = new Bundle(); |