Fix checkstyle errors (2/2)
* Manual style corrections with IDE assistance
* Variable name refactors are done through IDE
* Corrected general style errors such as:
- "final private var" -> "private final var"
- "&&", "+", "||" should not be at the end of line
- Non-static private variable should be like "mVar"
- Private static variable should be like "sVar"
- Code file should always end with newline
- Inherited methods should be annotated with @Override
and no @hide tags
- Public methods should always have a JavaDoc entry
- "int[] array" is preferred over "int array[]"
- private methods should be accessed without "this."
when there is no name collisions.
- "boolean ? true : false" -> boolean
- "boolean ? false : true" -> !boolean
- "boolean == true" OR "boolean != false" -> boolean
- "boolean != true" OR "boolean == false" -> !boolean
Bug: 63596319
Test: make checkbuild, no functional changes
Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
diff --git a/core/java/android/bluetooth/BluetoothInputDevice.java b/core/java/android/bluetooth/BluetoothInputDevice.java
index a9b2e56..a9a9010 100644
--- a/core/java/android/bluetooth/BluetoothInputDevice.java
+++ b/core/java/android/bluetooth/BluetoothInputDevice.java
@@ -224,7 +224,7 @@
private BluetoothAdapter mAdapter;
private IBluetoothInputDevice mService;
- final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
+ private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
new IBluetoothStateChangeCallback.Stub() {
public void onBluetoothStateChange(boolean up) {
if (DBG) Log.d(TAG, "onBluetoothStateChange: up=" + up);
@@ -385,6 +385,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public List<BluetoothDevice> getConnectedDevices() {
if (VDBG) log("getConnectedDevices()");
if (mService != null && isEnabled()) {
@@ -402,6 +403,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
if (VDBG) log("getDevicesMatchingStates()");
if (mService != null && isEnabled()) {
@@ -419,6 +421,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public int getConnectionState(BluetoothDevice device) {
if (VDBG) log("getState(" + device + ")");
if (mService != null && isEnabled() && isValidDevice(device)) {
@@ -451,8 +454,8 @@
public boolean setPriority(BluetoothDevice device, int priority) {
if (DBG) log("setPriority(" + device + ", " + priority + ")");
if (mService != null && isEnabled() && isValidDevice(device)) {
- if (priority != BluetoothProfile.PRIORITY_OFF &&
- priority != BluetoothProfile.PRIORITY_ON) {
+ if (priority != BluetoothProfile.PRIORITY_OFF
+ && priority != BluetoothProfile.PRIORITY_ON) {
return false;
}
try {