Follow error prone recommendation
In btservice/RemoteDevices.java: ``` 468: warning: Private method 'isCoordinatedSetMember' is never used. private boolean isCoordinatedSetMember() { ^ 651: warning: The local variable 'numUuids' is never read. int numUuids = val.length / AbstractionLayer.BT_UUID_SIZE; ^ 140: warning: This assignment is to a static field. Mutating static state from a constructor is highly error-prone. sAdapter = BluetoothAdapter.getDefaultAdapter(); ^ 141: warning: This assignment is to a static field. Mutating static state from a constructor is highly error-prone. sAdapterService = service; ^ 142: warning: This assignment is to a static field. Mutating static state from a constructor is highly error-prone. sSdpTracker = new ArrayList<BluetoothDevice>(); ^ 145: warning: It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. mDeviceQueue = new LinkedList<String>(); ^ 192: warning: Method reset() annotated [none] but too narrow; invokes method requiring {allOf=[android.permission.BLUETOOTH_CONNECT]} if (bluetoothDevice.isConnected()) { ^ 197: warning: Broadcast annotated {allOf=[android.permission.BLUETOOTH_CONNECT]} but protected with {allOf=[android.permission.BLUETOOTH]} sAdapterService.sendBroadcast(intent, AdapterService.BLUETOOTH_PERM); ^ 397: warning: Parameter name `mBondState` is unknown. Did you mean newBondState? * @param mBondState the mBondState to set ^ 853: warning: Method aclStateChangeCallback() annotated [none] but too narrow; invokes method requiring {allOf=[android.permission.BLUETOOTH_CONNECT]} + device.getBondState()); ^ ``` Bug: 236759221 Test: m RUN_ERROR_PRONE=true Bluetooth Test: atest 'BluetoothInstrumentationTests:com.android.bluetooth.btservice.RemoteDevicesTest' Merged-In: Ie3f35df29a81a5f55a28b63ce2c228eedd1f72f0 Change-Id: Ie3f35df29a81a5f55a28b63ce2c228eedd1f72f0
Loading
Please register or sign in to comment