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

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

Merge "SystemServer: Extends error prone enforced list" into main

parents e42c8b81 c7480a13
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -189,10 +189,9 @@ java_defaults {
java_defaults {
    name: "bluetooth_framework_errorprone_rules",
    defaults: ["bluetooth_errorprone_rules"],
    plugins: [
        "error_prone_android_framework",
    ],
    errorprone: {
        extra_check_modules: ["error_prone_android_framework"],

        javacflags: [
            "-Xep:AndroidFrameworkBinderIdentity:ERROR",
            "-Xep:AndroidFrameworkBluetoothPermission:ERROR",
+0 −1
Original line number Diff line number Diff line
@@ -283,7 +283,6 @@ android_app {

    plugins: [
        "androidx.room_room-compiler-plugin",
        "error_prone_android_framework",
    ],

    // Export schemas to the test directory so that we have an history
+0 −3
Original line number Diff line number Diff line
@@ -90,9 +90,6 @@ java_sdk_library {
        "android.bluetooth",
        "com.android.bluetooth.jarjar",
    ],
    plugins: [
        "error_prone_android_framework",
    ],
    aconfig_declarations: [
        "bluetooth_aconfig_flags",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package {

java_defaults {
    name: "service-bluetooth-buildflags",
    defaults: ["bluetooth_errorprone_rules"],
    defaults: ["bluetooth_framework_errorprone_rules"],

    lint: {
        error_checks: [
+9 −11
Original line number Diff line number Diff line
@@ -253,13 +253,12 @@ class BluetoothManagerService {
        }
        mName = name;
        Log.v(TAG, "storeName(" + mName + "): Success");
        mContext.sendBroadcastAsUser(
        Intent intent =
                new Intent(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)
                        .putExtra(BluetoothAdapter.EXTRA_LOCAL_NAME, name)
                        .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT),
                UserHandle.ALL,
                BLUETOOTH_CONNECT,
                getTempAllowlistBroadcastOptions());
                        .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        mContext.sendBroadcastAsUser(
                intent, UserHandle.ALL, BLUETOOTH_CONNECT, getTempAllowlistBroadcastOptions());
    }

    private void storeAddress(String address) {
@@ -2216,13 +2215,12 @@ class BluetoothManagerService {
        if (mEnable) {
            long onDuration = SystemClock.elapsedRealtime() - mLastEnabledTime;
            String onDurationString =
                    String.format(
                            Locale.US,
                    android.bluetooth.BluetoothUtils.formatSimple(
                            "%02d:%02d:%02d.%03d",
                            (int) (onDuration / (1000 * 60 * 60)),
                            (int) ((onDuration / (1000 * 60)) % 60),
                            (int) ((onDuration / 1000) % 60),
                            (int) (onDuration % 1000));
                            onDuration / (1000 * 60 * 60),
                            (onDuration / (1000 * 60)) % 60,
                            (onDuration / 1000) % 60,
                            onDuration % 1000);
            writer.println("  time since enabled: " + onDurationString);
        }

Loading