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

Commit 09499c3b authored by David Duarte's avatar David Duarte Committed by Gerrit Code Review
Browse files

Merge "Bluetooth: Fix Unused{Method,Variable} errorprone warnings" into main

parents 86fed914 88dc89c9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -318,6 +318,9 @@ android_app {
        javacflags: [
            // "-Xep:AndroidFrameworkRequiresPermission:ERROR",
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
            "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files
        ],
    },
    min_sdk_version: "Tiramisu",
+4 −6
Original line number Diff line number Diff line
@@ -261,12 +261,10 @@ public class BluetoothMethodProxy {
        manager.transferSetInfo(bda, serviceData, advHandle, callback);
    }

    /**
     * Proxies {@link AppAdvertiseStats}.
     */
    public AppAdvertiseStats createAppAdvertiseStats(int appUid, int id, String name,
            ContextMap map, GattService service) {
        return new AppAdvertiseStats(appUid, id, name, map, service);
    /** Proxies {@link AppAdvertiseStats}. */
    public AppAdvertiseStats createAppAdvertiseStats(
            int id, String name, ContextMap map, GattService service) {
        return new AppAdvertiseStats(id, name, map, service);
    }

    /** Proxies {@link Thread#start()}. */
+0 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import com.android.obex.ResponseCodes;
import com.android.obex.ServerSession;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Wraps multiple BluetoothServerSocket objects to make it possible to accept connections on
@@ -58,7 +57,6 @@ public class ObexServerSockets {
    private SocketAcceptThread mRfcommThread;
    private SocketAcceptThread mL2capThread;

    private static volatile AtomicInteger sInstanceCounter = new AtomicInteger(0);

    private ObexServerSockets(IObexConnectionHandler conHandler, BluetoothServerSocket rfcommSocket,
            BluetoothServerSocket l2capSocket) {
+0 −15
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import java.util.Objects;
 * A2DP Codec Configuration setup.
 */
class A2dpCodecConfig {
    private static final boolean DBG = true;
    private static final String TAG = "A2dpCodecConfig";

    private Context mContext;
@@ -53,8 +52,6 @@ class A2dpCodecConfig {
            BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
    private @CodecPriority int mA2dpSourceCodecPriorityLdac =
            BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
    private @CodecPriority int mA2dpSourceCodecPriorityLc3 =
            BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
    private @CodecPriority int mA2dpSourceCodecPriorityOpus =
            BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;

@@ -247,18 +244,6 @@ class A2dpCodecConfig {
            mA2dpSourceCodecPriorityLdac = value;
        }

        try {
            value = SystemProperties.getInt(
                "bluetooth.a2dp.source.lc3_priority.config",
                resources.getInteger(R.integer.a2dp_source_codec_priority_lc3));
        } catch (NotFoundException e) {
            value = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
        }
        if ((value >= BluetoothCodecConfig.CODEC_PRIORITY_DISABLED) && (value
                < BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST)) {
            mA2dpSourceCodecPriorityLc3 = value;
        }

        try {
            value = resources.getInteger(R.integer.a2dp_source_codec_priority_opus);
        } catch (NotFoundException e) {
+0 −1
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ public class A2dpSinkStreamHandler extends Handler {

    // Configuration Variables
    private static final int DEFAULT_DUCK_PERCENT = 25;
    private static final int SETTLE_TIMEOUT = 400;

    // Incoming events.
    public static final int SRC_STR_START = 0; // Audio stream from remote device started
Loading