diff options
author | 2025-02-21 15:48:00 -0800 | |
---|---|---|
committer | 2025-03-04 16:02:48 -0800 | |
commit | 70c485dfc1793bf3a3826a19b09ea142cd61a682 (patch) | |
tree | 0ead9339bcb584384f6898819e896d5340aa1bfd /service | |
parent | 4e24ffe3a8fbb91cc0cb48b95cdf08f981821493 (diff) |
Errorprone fix & enforce FieldCanBeFinal
Bug: 344658662
Test: m BluetoothInstrumentationTests
Test: m .
Flag: Exempt refactor
Change-Id: Iea773640f276794f32020685feb886b53485a0c1
Diffstat (limited to 'service')
-rw-r--r-- | service/src/com/android/server/bluetooth/BluetoothManagerService.java | 4 | ||||
-rw-r--r-- | service/tests/src/com/android/server/bluetooth/BluetoothServiceBinderTest.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/service/src/com/android/server/bluetooth/BluetoothManagerService.java b/service/src/com/android/server/bluetooth/BluetoothManagerService.java index 6cd63181da..fe63ff1c21 100644 --- a/service/src/com/android/server/bluetooth/BluetoothManagerService.java +++ b/service/src/com/android/server/bluetooth/BluetoothManagerService.java @@ -827,7 +827,7 @@ class BluetoothManagerService { } class ClientDeathRecipient implements IBinder.DeathRecipient { - private String mPackageName; + private final String mPackageName; ClientDeathRecipient(String packageName) { mPackageName = packageName; @@ -1356,7 +1356,7 @@ class BluetoothManagerService { } } - private BluetoothServiceConnection mConnection = new BluetoothServiceConnection(); + private final BluetoothServiceConnection mConnection = new BluetoothServiceConnection(); private int mWaitForEnableRetry; private int mWaitForDisableRetry; diff --git a/service/tests/src/com/android/server/bluetooth/BluetoothServiceBinderTest.java b/service/tests/src/com/android/server/bluetooth/BluetoothServiceBinderTest.java index 07466e59c4..ec4abca34f 100644 --- a/service/tests/src/com/android/server/bluetooth/BluetoothServiceBinderTest.java +++ b/service/tests/src/com/android/server/bluetooth/BluetoothServiceBinderTest.java @@ -96,7 +96,7 @@ public class BluetoothServiceBinderTest { @Mock private AppOpsManager mAppOpsManager; @Mock private DevicePolicyManager mDevicePolicyManager; - private Context mContext = + private final Context mContext = spy( new ContextWrapper( InstrumentationRegistry.getInstrumentation().getTargetContext())); |