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

Commit 25099ca8 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12537680 from 381ec394 to 25Q1-release

Change-Id: If3efe334a175ec17ae83d53793f9a77f1d11bf47
parents 78c4f9e2 381ec394
Loading
Loading
Loading
Loading

.clang-tidy

0 → 100644
+4 −0
Original line number Diff line number Diff line
---
CheckOptions:
  - key:             misc-include-cleaner.IgnoreHeaders
    value:           (fmt/.*|bits/pthread_types\.h)
+25 −2
Original line number Diff line number Diff line
@@ -75,6 +75,27 @@ cc_defaults {
    cpp_std: "c++20",
}

// List of tidy checks that are enabled for cc targets.
// Note that the goal is not to enable all checks, many of them will
// appear as noise especially in the modernize-* range.
bluetooth_tidy_checks = [
    "-*",
    "misc-*",

    // This check implements detection of local variables which could be declared
    // as const but are not.
    "-misc-const-correctness",
]

// This default tidy checks that will be run against all the cc targets
// developed by the Bluetooth team.
cc_defaults {
    name: "bluetooth_tidy",
    tidy: true,
    tidy_checks: bluetooth_tidy_checks,
    tidy_checks_as_errors: bluetooth_tidy_checks,
}

java_defaults {
    name: "bluetooth_errorprone_rules",
    errorprone: {
@@ -147,8 +168,10 @@ java_defaults {
            // Exclude generated files
            "-XepExcludedPaths:.*/srcjars/.*",

            // The @InlineMe annotation is not available
            // "-Xep:InlineMeSuggester:OFF",
            // The @InlineMe annotation could be made available, but it would
            // apply on external facing API. This is not desired. For more
            // context, see https://r.android.com/3303475
            "-Xep:InlineMeSuggester:OFF",
        ],
    },
}
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@
        </receiver>
        <activity android:name="com.android.bluetooth.opp.BluetoothOppLauncherActivity"
             android:process="@string/process"
             android:theme="@android:style/Theme.Material.Light.Dialog"
             android:theme="@android:style/Theme.Translucent.NoTitleBar"
             android:label="@string/bt_share_picker_label"
             android:enabled="false"
             android:exported="true">
+3 −7
Original line number Diff line number Diff line
@@ -531,7 +531,7 @@ class AdapterProperties {
            return;
        }

        if (Flags.cleanupLeOnlyDeviceType() && deviceType != BluetoothDevice.DEVICE_TYPE_LE) {
        if (deviceType != BluetoothDevice.DEVICE_TYPE_LE) {
            return;
        }

@@ -547,12 +547,8 @@ class AdapterProperties {
            boolean removeExisting = false;
            if (identityAddress.equals(existingIdentityAddress)
                    && !address.equals(existingAddress)) {
                if (Flags.cleanupLeOnlyDeviceType()) {
                // Existing device record should be removed only if the device type is LE-only
                removeExisting = (existingDeviceType == BluetoothDevice.DEVICE_TYPE_LE);
                } else {
                    removeExisting = true;
                }
            }

            if (removeExisting) {
+3 −21
Original line number Diff line number Diff line
@@ -463,12 +463,7 @@ public class TransitionalScanHelper {
                }
            } catch (RemoteException | PendingIntent.CanceledException e) {
                Log.e(TAG, "Exception: " + e);
                if (Flags.leScanFixRemoteException()) {
                handleDeadScanClient(client);
                } else {
                    mScannerMap.remove(client.scannerId);
                    mScanManager.stopScan(client.scannerId);
                }
            }
        }
    }
@@ -772,12 +767,7 @@ public class TransitionalScanHelper {
            }
        } catch (RemoteException | PendingIntent.CanceledException e) {
            Log.e(TAG, "Exception: " + e);
            if (Flags.leScanFixRemoteException()) {
            handleDeadScanClient(client);
            } else {
                mScannerMap.remove(client.scannerId);
                mScanManager.stopScan(client.scannerId);
            }
        }
    }

@@ -1518,15 +1508,7 @@ public class TransitionalScanHelper {

            ScanClient client = getScanClient(mScannerId);
            if (client != null) {
                if (Flags.leScanFixRemoteException()) {
                handleDeadScanClient(client);
                } else {
                    client.appDied = true;
                    if (client.stats != null) {
                        client.stats.isAppDead = true;
                    }
                    stopScanInternal(client.scannerId);
                }
            }
        }

Loading