am f59ce468: am b477fc6c: Merge "add command to enable bt snoop log" into klp-modular-dev
* commit 'f59ce46880ebe2c2466a2c862ec2ed401f635d51':
add command to enable bt snoop log
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.content.Context;
import android.os.Bundle;
+import junit.framework.Assert;
+
import java.util.Set;
public class BluetoothInstrumentation extends Instrumentation {
@@ -70,6 +72,8 @@
getAddress();
} else if ("getBondedDevices".equals(command)) {
getBondedDevices();
+ } else if ("enableBtSnoop".equals(command)) {
+ enableBtSnoop();
} else {
finish(null);
}
@@ -112,6 +116,12 @@
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();