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) Android.bp +25 −2 Original line number Diff line number Diff line Loading @@ -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: { Loading Loading @@ -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", ], }, } Loading android/app/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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"> Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +3 −7 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ class AdapterProperties { return; } if (Flags.cleanupLeOnlyDeviceType() && deviceType != BluetoothDevice.DEVICE_TYPE_LE) { if (deviceType != BluetoothDevice.DEVICE_TYPE_LE) { return; } Loading @@ -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) { Loading android/app/src/com/android/bluetooth/le_scan/TransitionalScanHelper.java +3 −21 Original line number Diff line number Diff line Loading @@ -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); } } } } Loading Loading @@ -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); } } } Loading Loading @@ -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 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)
Android.bp +25 −2 Original line number Diff line number Diff line Loading @@ -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: { Loading Loading @@ -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", ], }, } Loading
android/app/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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"> Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +3 −7 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ class AdapterProperties { return; } if (Flags.cleanupLeOnlyDeviceType() && deviceType != BluetoothDevice.DEVICE_TYPE_LE) { if (deviceType != BluetoothDevice.DEVICE_TYPE_LE) { return; } Loading @@ -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) { Loading
android/app/src/com/android/bluetooth/le_scan/TransitionalScanHelper.java +3 −21 Original line number Diff line number Diff line Loading @@ -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); } } } } Loading Loading @@ -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); } } } Loading Loading @@ -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