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

Commit 7a968a64 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I02076bf8,I752af336 into main

* changes:
  SystemService: Fix lint error "UseValueOf"
  SystemService: Promote more warning as error
parents b3b7e853 f94761ff
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -51,8 +51,23 @@ java_defaults {
    sdk_version: "system_server_current",

    lint: {
        error_checks: [
            "ExtraText",
            "MissingClass",
            "NewApi",
            "ObsoleteSdkInt",
            "Recycle",
            "RtlHardcoded",
            "UseSparseArrays",
            "UseValueOf",
        ],
        strict_updatability_linting: true,
    },

    kotlincflags: [
        "-Werror",
    ],

    libs: [
        "framework-annotations-lib",
        "framework-bluetooth-pre-jarjar",
+52 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 8.1.0-dev" client="" dependencies="true" name="" type="baseline" variant="all" version="8.1.0-dev">

    <issue
        id="NotificationPermission"
        message="When targeting Android 13 or higher, posting a permission requires holding the `POST_NOTIFICATIONS` permission">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothNotificationManager.java"
            line="125"/>
    </issue>

    <issue
        id="VisibleForTests"
        message="This method should only be accessed from tests or within private scope">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothAirplaneModeListener.java"
            line="239"/>
    </issue>

    <issue
        id="VisibleForTests"
        message="This method should only be accessed from tests or within private scope">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothAirplaneModeListener.java"
            line="247"/>
    </issue>

    <issue
        id="VisibleForTests"
        message="This method should only be accessed from tests or within private scope">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothManagerService.java"
            line="1532"/>
    </issue>

    <issue
        id="VisibleForTests"
        message="This method should only be accessed from tests or within private scope">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothSatelliteModeListener.java"
            line="48"/>
    </issue>

    <issue
        id="VisibleForTests"
        message="This method should only be accessed from tests or within private scope">
        <location
            file="packages/modules/Bluetooth/service/src/com/android/server/bluetooth/BluetoothSatelliteModeListener.java"
            line="51"/>
    </issue>

</issues>
+4 −5
Original line number Diff line number Diff line
@@ -1410,7 +1410,7 @@ class BluetoothManagerService {
                                + ", not in supported profiles list");
                return false;
            }
            ProfileServiceConnections psc = mProfileServices.get(Integer.valueOf(bluetoothProfile));
            ProfileServiceConnections psc = mProfileServices.get(bluetoothProfile);
            if (psc == null) {
                if (DBG) {
                    Log.d(
@@ -1424,7 +1424,7 @@ class BluetoothManagerService {
                    return false;
                }

                mProfileServices.put(new Integer(bluetoothProfile), psc);
                mProfileServices.put(bluetoothProfile, psc);
            }
        }

@@ -1439,8 +1439,7 @@ class BluetoothManagerService {
    void unbindBluetoothProfileService(
            int bluetoothProfile, IBluetoothProfileServiceConnection proxy) {
        synchronized (mProfileServices) {
            Integer profile = new Integer(bluetoothProfile);
            ProfileServiceConnections psc = mProfileServices.get(profile);
            ProfileServiceConnections psc = mProfileServices.get(bluetoothProfile);
            if (psc == null) {
                return;
            }
@@ -1453,7 +1452,7 @@ class BluetoothManagerService {
                    Log.e(TAG, "Unable to unbind service with intent: " + psc.mIntent, e);
                }
                if (!mUnbindingAll) {
                    mProfileServices.remove(profile);
                    mProfileServices.remove(bluetoothProfile);
                }
            }
        }