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

Commit 2fa7b695 authored by William Escande's avatar William Escande
Browse files

ErrorProne: Enforce & fix ClassCanBeStatic

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

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: Exempt Build and test only
Change-Id: Iaa097df27bcf30a95bc23b1dba78d58f789e7364
parent c5dd0ab9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ android_app {
        javacflags: [
            // "-Xep:AndroidFrameworkRequiresPermission:ERROR",
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
            "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class AvrcpCoverArtManager {
     * An object representing an image download event. Contains the information necessary to
     * retrieve the image from storage.
     */
    public class DownloadEvent {
    public static class DownloadEvent {
        final String mImageUuid;
        final Uri mUri;

@@ -91,7 +91,7 @@ public class AvrcpCoverArtManager {
     *
     * <p>Currently contains the mapping of image handles seen to assigned UUIDs.
     */
    private class AvrcpBipSession {
    private static class AvrcpBipSession {
        private Map<String, String> mUuids = new ConcurrentHashMap<>(1); /* handle -> UUID */
        private Map<String, String> mHandles = new ConcurrentHashMap<>(1); /* UUID -> handle */

+1 −1
Original line number Diff line number Diff line
@@ -3300,7 +3300,7 @@ public class BassClientService extends ProfileService {
            mCallbacks.finishBroadcast();
        }

        private class ObjParams {
        private static class ObjParams {
            Object mObj1;
            Object mObj2;

+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class AdvertiseManager {
        }
    }

    class AdvertiserInfo {
    static class AdvertiserInfo {
        /* When id is negative, the registration is ongoing. When the registration finishes, id
         * becomes equal to advertiser_id */
        public Integer id;
+2 −2
Original line number Diff line number Diff line
@@ -146,12 +146,12 @@ public class GattService extends ProfileService {
    private AdvertiserMap mAdvertiserMap = new AdvertiserMap();

    /** List of our registered clients. */
    class ClientMap extends ContextMap<IBluetoothGattCallback, Void> {}
    static class ClientMap extends ContextMap<IBluetoothGattCallback, Void> {}

    ClientMap mClientMap = new ClientMap();

    /** List of our registered server apps. */
    class ServerMap extends ContextMap<IBluetoothGattServerCallback, Void> {}
    static class ServerMap extends ContextMap<IBluetoothGattServerCallback, Void> {}

    ServerMap mServerMap = new ServerMap();

Loading