am b477fc6c
: Merge "add command to enable bt snoop log" into klp-modular-dev
* commit 'b477fc6c2fcd04e6952a7eec856d30b64fd95e0c': add command to enable bt snoop log
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user