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

Commit a853d528 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "Fix errorprone issues - part 2"

parents 48d8e1e1 4691705d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -918,7 +918,7 @@ public class StateMachineTest {
            }
        }

        class ChildState extends State {
        static class ChildState extends State {
            @Override
            public boolean processMessage(Message message) {
                return NOT_HANDLED;
@@ -1013,7 +1013,7 @@ public class StateMachineTest {
            }
        }

        class ChildState2 extends State {
        static class ChildState2 extends State {
            @Override
            public boolean processMessage(Message message) {
                return NOT_HANDLED;
@@ -1586,7 +1586,7 @@ public class StateMachineTest {
         * without a delay the arrival time difference should always >= to SM7_DELAY_TIME.
         */
        long arrivalTimeDiff = sm7.mArrivalTimeMsg3 - sm7.mArrivalTimeMsg2;
        long expectedDelay = sm7.SM7_DELAY_TIME - SM7_DELAY_FUDGE;
        long expectedDelay = (long) sm7.SM7_DELAY_TIME - SM7_DELAY_FUDGE;
        if (sm7.isDbg()) tlog("testStateMachine7: expect " + arrivalTimeDiff
                + " >= " + expectedDelay);
        Assert.assertTrue(arrivalTimeDiff >= expectedDelay);
+0 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ public class MediaPlayerListTest {
        when(mMockContext.registerReceiver(any(), any())).thenReturn(null);
        when(mMockContext.getApplicationContext()).thenReturn(mMockContext);
        when(mMockContext.getPackageManager()).thenReturn(mockPackageManager);
        List<ResolveInfo> playerList = new ArrayList<ResolveInfo>();
        when(mockPackageManager.queryIntentServices(any(), anyInt())).thenReturn(null);

        Method method = BrowsablePlayerConnector.class.getDeclaredMethod("setInstanceForTesting",
+3 −3
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ public final class AvrcpItemTest {
        Assert.assertEquals(UUID, desc.getMediaId());
        Assert.assertEquals(null, desc.getMediaUri());
        Assert.assertEquals(title, desc.getTitle().toString());
        Assert.assertEquals(null, desc.getSubtitle());
        Assert.assertEquals(desc.getSubtitle(), null);
        Assert.assertEquals(uri, desc.getIconUri());
        Assert.assertEquals(null, desc.getIconBitmap());
    }
@@ -400,7 +400,7 @@ public final class AvrcpItemTest {
        Assert.assertEquals(UUID, desc.getMediaId());
        Assert.assertEquals(null, desc.getMediaUri());
        Assert.assertEquals(displayName, desc.getTitle().toString());
        Assert.assertEquals(null, desc.getSubtitle());
        Assert.assertEquals(desc.getSubtitle(), null);
        Assert.assertEquals(uri, desc.getIconUri());
        Assert.assertEquals(null, desc.getIconBitmap());
    }
@@ -427,7 +427,7 @@ public final class AvrcpItemTest {
        Assert.assertEquals(UUID, desc.getMediaId());
        Assert.assertEquals(null, desc.getMediaUri());
        Assert.assertEquals(title, desc.getTitle().toString());
        Assert.assertEquals(null, desc.getSubtitle());
        Assert.assertEquals(desc.getSubtitle(), null);
        Assert.assertEquals(uri, desc.getIconUri());
        Assert.assertEquals(null, desc.getIconBitmap());
    }
+2 −2
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@@ -113,7 +113,7 @@ public final class BluetoothKeystoreServiceTest {
            "LE_KEY_LID ="
            );

    private List<String> mConfigData = new LinkedList<>();
    private List<String> mConfigData = new ArrayList<>();

    private Map<String, String> mNameDecryptKeyResult = new HashMap<>();

+10 −10
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ public class HidDeviceTest {
            try {
                mConnectionStateChangedQueue.put(intent);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }
    }
@@ -177,9 +177,8 @@ public class HidDeviceTest {
            Assert.assertNotNull(intent);
            return intent;
        } catch (InterruptedException e) {
            Assert.fail("Cannot obtain an Intent from the queue");
            throw new AssertionError("Cannot obtain an Intent from the queue", e);
        }
        return null;
    }

    private void verifyConnectionStateIntent(int timeoutMs, BluetoothDevice device, int newState,
@@ -200,7 +199,7 @@ public class HidDeviceTest {
            int lastCallbackType = lastCallback;
            Assert.assertEquals(callbackType, lastCallbackType);
        } catch (InterruptedException e) {
            Assert.fail("Cannot obtain a callback from the queue");
            throw new AssertionError("Cannot obtain a callback from the queue", e);
        }
    }

@@ -213,7 +212,7 @@ public class HidDeviceTest {
                    mCallbackQueue.put(CALLBACK_APP_UNREGISTERED);
                }
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }

@@ -225,7 +224,7 @@ public class HidDeviceTest {
            try {
                mCallbackQueue.put(CALLBACK_ON_GET_REPORT);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }

@@ -233,7 +232,7 @@ public class HidDeviceTest {
            try {
                mCallbackQueue.put(CALLBACK_ON_SET_REPORT);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }

@@ -241,7 +240,7 @@ public class HidDeviceTest {
            try {
                mCallbackQueue.put(CALLBACK_ON_SET_PROTOCOL);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }

@@ -249,7 +248,8 @@ public class HidDeviceTest {
            try {
                mCallbackQueue.put(CALLBACK_ON_INTR_DATA);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);

            }
        }

@@ -257,7 +257,7 @@ public class HidDeviceTest {
            try {
                mCallbackQueue.put(CALLBACK_ON_VIRTUAL_UNPLUG);
            } catch (InterruptedException e) {
                Assert.fail("Cannot add Intent to the queue");
                throw new AssertionError("Cannot add Intent to the queue", e);
            }
        }
    }
Loading