Loading core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.app.Instrumentation; import android.content.Context; import android.content.Context; import android.os.Bundle; import android.os.Bundle; import junit.framework.Assert; import java.util.Set; import java.util.Set; public class BluetoothInstrumentation extends Instrumentation { public class BluetoothInstrumentation extends Instrumentation { Loading Loading @@ -70,6 +72,8 @@ public class BluetoothInstrumentation extends Instrumentation { getAddress(); getAddress(); } else if ("getBondedDevices".equals(command)) { } else if ("getBondedDevices".equals(command)) { getBondedDevices(); getBondedDevices(); } else if ("enableBtSnoop".equals(command)) { enableBtSnoop(); } else { } else { finish(null); finish(null); } } Loading Loading @@ -112,6 +116,12 @@ public class BluetoothInstrumentation extends Instrumentation { finish(mSuccessResult); finish(mSuccessResult); } } public void enableBtSnoop() { Assert.assertTrue("failed to enable snoop log", getBluetoothAdapter().configHciSnoopLog(true)); finish(mSuccessResult); } public void finish(Bundle result) { public void finish(Bundle result) { if (result == null) { if (result == null) { result = new Bundle(); result = new Bundle(); Loading Loading
core/tests/bluetoothtests/src/android/bluetooth/BluetoothInstrumentation.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.app.Instrumentation; import android.content.Context; import android.content.Context; import android.os.Bundle; import android.os.Bundle; import junit.framework.Assert; import java.util.Set; import java.util.Set; public class BluetoothInstrumentation extends Instrumentation { public class BluetoothInstrumentation extends Instrumentation { Loading Loading @@ -70,6 +72,8 @@ public class BluetoothInstrumentation extends Instrumentation { getAddress(); getAddress(); } else if ("getBondedDevices".equals(command)) { } else if ("getBondedDevices".equals(command)) { getBondedDevices(); getBondedDevices(); } else if ("enableBtSnoop".equals(command)) { enableBtSnoop(); } else { } else { finish(null); finish(null); } } Loading Loading @@ -112,6 +116,12 @@ public class BluetoothInstrumentation extends Instrumentation { finish(mSuccessResult); finish(mSuccessResult); } } public void enableBtSnoop() { Assert.assertTrue("failed to enable snoop log", getBluetoothAdapter().configHciSnoopLog(true)); finish(mSuccessResult); } public void finish(Bundle result) { public void finish(Bundle result) { if (result == null) { if (result == null) { result = new Bundle(); result = new Bundle(); Loading