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

Commit b7e05cca authored by William Escande's avatar William Escande
Browse files

ErrorProne: Enforce & fix UnnecessaryAsync

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: Exempt Build and test only
Change-Id: I6000e7a3d1552213a017a4e94ef51a5783101eb1
parent 1655cb6b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ java_defaults {
        javacflags: [
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:UnnecessaryAsync:ERROR",
            "-Xep:UnusedMethod:ERROR",
        ],
    },
+0 −2
Original line number Diff line number Diff line
@@ -638,12 +638,10 @@ public class SapServerTest {
    @Test
    public void handleMessage_forProxyDeadMsg_notifiesShutDown() throws Exception {
        ISapRilReceiver mockReceiver = mock(ISapRilReceiver.class);
        AtomicLong cookie = new AtomicLong(23);
        mSapServer.mRilBtReceiver = mockReceiver;

        Message message = Message.obtain();
        message.what = SAP_PROXY_DEAD;
        message.obj = cookie.get();

        try {
            mSapServer.handleMessage(message);
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ java_sdk_library {
        javacflags: [
            "-Xep:InlineMeSuggester:OFF", // The @InlineMe annotation is not available
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:UnnecessaryAsync:ERROR",
            "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files
        ],
        enabled: true,
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ java_defaults {
            "-Xep:EqualsIncompatibleType:ERROR",
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:ReferenceEquality:ERROR",
            "-Xep:UnnecessaryAsync:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
        ],