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

Commit a355e5ef authored by Jack He's avatar Jack He
Browse files

Fix checkstyle errors (1/2)

* Automatic style corrections through IDE

Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
parent b09cf3fb
Loading
Loading
Loading
Loading
+82 −69
Original line number Diff line number Diff line
@@ -139,39 +139,52 @@ public final class BluetoothA2dp implements BluetoothProfile {
    /**
     * We don't have a stored preference for whether or not the given A2DP sink device supports
     * optional codecs.
     * @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_SUPPORT_UNKNOWN = -1;

    /**
     * The given A2DP sink device does not support optional codecs.
     * @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_NOT_SUPPORTED = 0;

    /**
     * The given A2DP sink device does support optional codecs.
     * @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_SUPPORTED = 1;

    /**
     * We don't have a stored preference for whether optional codecs should be enabled or disabled
     * for the given A2DP device.
     * @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_PREF_UNKNOWN = -1;

    /**
     * Optional codecs should be disabled for the given A2DP device.
     * @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_PREF_DISABLED = 0;

    /**
     * Optional codecs should be enabled for the given A2DP device.
     *  @hide */
     *
     * @hide
     */
    public static final int OPTIONAL_CODECS_PREF_ENABLED = 1;

    private Context mContext;
    private ServiceListener mServiceListener;
    private final ReentrantReadWriteLock mServiceLock = new ReentrantReadWriteLock();
    @GuardedBy("mServiceLock") private IBluetoothA2dp mService;
    @GuardedBy("mServiceLock")
    private IBluetoothA2dp mService;
    private BluetoothAdapter mAdapter;

    final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -204,10 +217,10 @@ public final class BluetoothA2dp implements BluetoothProfile {
                    }
                }
            };

    /**
     * Create a BluetoothA2dp proxy object for interacting with the local
     * Bluetooth A2DP service.
     *
     */
    /*package*/ BluetoothA2dp(Context context, ServiceListener l) {
        mContext = context;
@@ -265,6 +278,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
        // The empty finalize needs to be kept or the
        // cts signature tests would fail.
    }

    /**
     * Initiate connection to a profile of the remote bluetooth device.
     *
@@ -283,8 +297,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * permission.
     *
     * @param device Remote Bluetooth Device
     * @return false on immediate error,
     *               true otherwise
     * @return false on immediate error, true otherwise
     * @hide
     */
    public boolean connect(BluetoothDevice device) {
@@ -327,8 +340,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * permission.
     *
     * @param device Remote Bluetooth Device
     * @return false on immediate error,
     *               true otherwise
     * @return false on immediate error, true otherwise
     * @hide
     */
    public boolean disconnect(BluetoothDevice device) {
@@ -577,6 +589,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * This function checks if the remote device is an AVCRP
     * target and thus whether we should send volume keys
     * changes or not.
     *
     * @hide
     */
    public boolean shouldSendVolumeKeys(BluetoothDevice device) {
@@ -692,7 +705,6 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * @param device The device to check
     * @return one of OPTIONAL_CODECS_SUPPORT_UNKNOWN, OPTIONAL_CODECS_NOT_SUPPORTED, or
     * OPTIONAL_CODECS_SUPPORTED.
     *
     * @hide
     */
    public int supportsOptionalCodecs(BluetoothDevice device) {
@@ -717,7 +729,6 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * @param device The device in question.
     * @return one of OPTIONAL_CODECS_PREF_UNKNOWN, OPTIONAL_CODECS_PREF_ENABLED, or
     * OPTIONAL_CODECS_PREF_DISABLED.
     *
     * @hide
     */
    public int getOptionalCodecsEnabled(BluetoothDevice device) {
@@ -772,6 +783,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
     * Helper for converting a state to a string.
     *
     * For debug use only - strings are not internationalized.
     *
     * @hide
     */
    public static String stateToString(int state) {
@@ -807,6 +819,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
                mServiceListener.onServiceConnected(BluetoothProfile.A2DP, BluetoothA2dp.this);
            }
        }

        public void onServiceDisconnected(ComponentName className) {
            if (DBG) Log.d(TAG, "Proxy object disconnected");
            try {
+61 −60
Original line number Diff line number Diff line
@@ -156,10 +156,10 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
                    }
                }
            };

    /**
     * Create a BluetoothA2dp proxy object for interacting with the local
     * Bluetooth A2DP service.
     *
     */
    /*package*/ BluetoothA2dpSink(Context context, ServiceListener l) {
        mContext = context;
@@ -215,6 +215,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
    public void finalize() {
        close();
    }

    /**
     * Initiate connection to a profile of the remote bluetooth device.
     *
@@ -233,8 +234,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     * permission.
     *
     * @param device Remote Bluetooth Device
     * @return false on immediate error,
     *               true otherwise
     * @return false on immediate error, true otherwise
     * @hide
     */
    public boolean connect(BluetoothDevice device) {
@@ -274,8 +274,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     * permission.
     *
     * @param device Remote Bluetooth Device
     * @return false on immediate error,
     *               true otherwise
     * @return false on immediate error, true otherwise
     * @hide
     */
    public boolean disconnect(BluetoothDevice device) {
@@ -458,6 +457,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     * Helper for converting a state to a string.
     *
     * For debug use only - strings are not internationalized.
     *
     * @hide
     */
    public static String stateToString(int state) {
@@ -489,6 +489,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
                        BluetoothA2dpSink.this);
            }
        }

        public void onServiceDisconnected(ComponentName className) {
            if (DBG) Log.d(TAG, "Proxy object disconnected");
            mService = null;
+21 −19
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import java.util.Arrays;
 * Record of energy and activity information from controller and
 * underlying bt stack state.Timestamp the record with system
 * time
 *
 * @hide
 */
public final class BluetoothActivityEnergyInfo implements Parcelable {
@@ -131,6 +132,7 @@ public final class BluetoothActivityEnergyInfo implements Parcelable {

    /**
     * product of current(mA), voltage(V) and time(ms)
     *
     * @return energy used
     */
    public long getControllerEnergyUsed() {
+274 −224

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -20,9 +20,9 @@ package android.bluetooth;
 * Bluetooth Assigned Numbers.
 * <p>
 * For now we only include Company ID values.
 * @see <a href="https://www.bluetooth.org/technical/assignednumbers/identifiers.htm">
 * The Official Bluetooth SIG Member Website | Company Identifiers</a>
 *
 * @see <a href="https://www.bluetooth.org/technical/assignednumbers/identifiers.htm"> The Official
 * Bluetooth SIG Member Website | Company Identifiers</a>
 */
public class BluetoothAssignedNumbers {

Loading