diff options
| author | Jack He <siyuanh@google.com> | 2017-08-22 21:21:23 -0700 |
|---|---|---|
| committer | Jack He <siyuanh@google.com> | 2017-08-24 19:09:58 +0000 |
| commit | 2992cd084cd5cfd9ef253c37ef269d6c75e7e144 (patch) | |
| tree | c9abf705b19e5989c34c124d533d7d214a65970a /core/java/android/bluetooth/BluetoothPan.java | |
| parent | a355e5efaf45a534ee6437aa4bae7d30f18c0ec2 (diff) | |
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
Diffstat (limited to 'core/java/android/bluetooth/BluetoothPan.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothPan.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/bluetooth/BluetoothPan.java b/core/java/android/bluetooth/BluetoothPan.java index 4c00649c947e..63e83d22178d 100644 --- a/core/java/android/bluetooth/BluetoothPan.java +++ b/core/java/android/bluetooth/BluetoothPan.java @@ -183,7 +183,7 @@ public final class BluetoothPan implements BluetoothProfile { close(); } - final private IBluetoothStateChangeCallback mStateChangeCallback = + private final IBluetoothStateChangeCallback mStateChangeCallback = new IBluetoothStateChangeCallback.Stub() { @Override @@ -238,8 +238,7 @@ public final class BluetoothPan implements BluetoothProfile { */ public boolean connect(BluetoothDevice device) { if (DBG) log("connect(" + device + ")"); - if (mPanService != null && isEnabled() && - isValidDevice(device)) { + if (mPanService != null && isEnabled() && isValidDevice(device)) { try { return mPanService.connect(device); } catch (RemoteException e) { @@ -278,8 +277,7 @@ public final class BluetoothPan implements BluetoothProfile { */ public boolean disconnect(BluetoothDevice device) { if (DBG) log("disconnect(" + device + ")"); - if (mPanService != null && isEnabled() && - isValidDevice(device)) { + if (mPanService != null && isEnabled() && isValidDevice(device)) { try { return mPanService.disconnect(device); } catch (RemoteException e) { @@ -294,6 +292,7 @@ public final class BluetoothPan implements BluetoothProfile { /** * {@inheritDoc} */ + @Override public List<BluetoothDevice> getConnectedDevices() { if (VDBG) log("getConnectedDevices()"); if (mPanService != null && isEnabled()) { @@ -311,6 +310,7 @@ public final class BluetoothPan implements BluetoothProfile { /** * {@inheritDoc} */ + @Override public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { if (VDBG) log("getDevicesMatchingStates()"); if (mPanService != null && isEnabled()) { @@ -328,6 +328,7 @@ public final class BluetoothPan implements BluetoothProfile { /** * {@inheritDoc} */ + @Override public int getConnectionState(BluetoothDevice device) { if (VDBG) log("getState(" + device + ")"); if (mPanService != null && isEnabled() |
