Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1a87d7a authored by David Duarte's avatar David Duarte
Browse files

BluetoothInstrumentationTests: Enforce UnusedVariable errorprone

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: TEST_ONLY
Change-Id: Idce2b9d34df322add47757e4fce7963ac29f6b83
parent 1a9798be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ java_defaults {
            "-Xep:UnnecessaryAssignment:ERROR",
            "-Xep:UnnecessaryAsync:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
        ],
    },

+0 −2
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@ import java.util.stream.IntStream;

/** A set of methods useful in Bluetooth instrumentation tests */
public class TestUtils {
    private static final int SERVICE_TOGGLE_TIMEOUT_MS = 1000; // 1s

    private static String sSystemScreenOffTimeout = "10000";

    private static final String TAG = "BluetoothTestUtils";
+0 −4
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import java.util.Arrays;
@RunWith(AndroidJUnit4.class)
public class A2dpCodecConfigTest {

    private Context mTargetContext;
    private BluetoothDevice mTestDevice;
    private A2dpCodecConfig mA2dpCodecConfig;

@@ -72,7 +71,6 @@ public class A2dpCodecConfigTest {
    private static final int APTX_PRIORITY_DEFAULT = 5001;
    private static final int APTX_HD_PRIORITY_DEFAULT = 7001;
    private static final int LDAC_PRIORITY_DEFAULT = 9001;
    private static final int LC3_PRIORITY_DEFAULT = 11001;
    private static final int OPUS_PRIORITY_DEFAULT = 13001;
    private static final int PRIORITY_HIGH = 1000000;

@@ -214,8 +212,6 @@ public class A2dpCodecConfigTest {

    @Before
    public void setUp() throws Exception {
        mTargetContext = InstrumentationRegistry.getTargetContext();

        when(mMockContext.getResources()).thenReturn(mMockResources);
        when(mMockResources.getInteger(R.integer.a2dp_source_codec_priority_sbc))
                .thenReturn(SBC_PRIORITY_DEFAULT);
+0 −2
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ import java.util.Arrays;
@RunWith(AndroidJUnit4.class)
public class A2dpStateMachineTest {
    private BluetoothAdapter mAdapter;
    private Context mTargetContext;
    private HandlerThread mHandlerThread;
    private A2dpStateMachine mA2dpStateMachine;
    private BluetoothDevice mTestDevice;
@@ -76,7 +75,6 @@ public class A2dpStateMachineTest {

    @Before
    public void setUp() throws Exception {
        mTargetContext = InstrumentationRegistry.getTargetContext();
        doReturn(mActiveDeviceManager).when(mAdapterService).getActiveDeviceManager();
        doReturn(mSilenceDeviceManager).when(mAdapterService).getSilenceDeviceManager();

+0 −3
Original line number Diff line number Diff line
@@ -58,13 +58,10 @@ public class A2dpSinkStateMachineTest {
    private A2dpSinkStateMachine mStateMachine;
    private BluetoothAdapter mAdapter;
    private BluetoothDevice mDevice;
    private Context mTargetContext;
    private TestLooper mLooper;

    @Before
    public void setUp() throws Exception {
        mTargetContext = InstrumentationRegistry.getTargetContext();

        mLooper = new TestLooper();

        mAdapter = BluetoothAdapter.getDefaultAdapter();
Loading