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

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

ErrorProne: Enforce & fix ReturnAtTheEndOfVoidFunction

See https://errorprone.info/bugpattern/ReturnAtTheEndOfVoidFunction

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: Exempt Build and test only
Change-Id: I4d7f779b8d6b9b00f991cd0d74bf0520c10e7025
parent 4923f67f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ android_app {
            "-Xep:InlineMeInliner:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:MockNotUsedInProduction:ERROR",
            "-Xep:ReturnAtTheEndOfVoidFunction:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
            "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files
+0 −1
Original line number Diff line number Diff line
@@ -568,7 +568,6 @@ public class MediaPlayerList {
            playerList.add(new ListItem(playerFolder));
        }
        cb.run("", playerList);
        return;
    }

    /**
+2 −6
Original line number Diff line number Diff line
@@ -246,13 +246,9 @@ public class MediaPlayerWrapper {
        return false;
    }

    void toggleShuffle(boolean on) {
        return;
    }
    void toggleShuffle(boolean on) {}

    void toggleRepeat(boolean on) {
        return;
    }
    void toggleRepeat(boolean on) {}

    /** Return whether the queue, metadata, and queueID are all in sync. */
    boolean isMetadataSynced() {
+0 −2
Original line number Diff line number Diff line
@@ -159,14 +159,12 @@ public class AvrcpCoverArtService {
    private void registerBipServer(int psm) {
        debug("Add our PSM (" + psm + ") to the AVRCP Target SDP record");
        mNativeInterface.registerBipServer(psm);
        return;
    }

    /** Remove any BIP L2CAP PSM from the AVRCP Target SDP Record */
    private void unregisterBipServer() {
        debug("Remove the PSM remove the AVRCP Target SDP record");
        mNativeInterface.unregisterBipServer();
        return;
    }

    /**
+0 −2
Original line number Diff line number Diff line
@@ -1581,7 +1581,6 @@ public class BassClientService extends ProfileService {
    public void registerCallback(IBluetoothLeBroadcastAssistantCallback cb) {
        Log.i(TAG, "registerCallback");
        mCallbacks.register(cb);
        return;
    }

    /**
@@ -1592,7 +1591,6 @@ public class BassClientService extends ProfileService {
    public void unregisterCallback(IBluetoothLeBroadcastAssistantCallback cb) {
        Log.i(TAG, "unregisterCallback");
        mCallbacks.unregister(cb);
        return;
    }

    /**
Loading