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 | 9e045d26d0128826b40520f523307d8d16473779 (patch) | |
tree | 8299c300f3b4dbc2a5360c3319ac41bf1b389e55 /framework/java/android/bluetooth/le/BluetoothLeScanner.java | |
parent | 910201beb0bde1dcf6b33e4ec5d1eb60042419d8 (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 'framework/java/android/bluetooth/le/BluetoothLeScanner.java')
-rw-r--r-- | framework/java/android/bluetooth/le/BluetoothLeScanner.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/framework/java/android/bluetooth/le/BluetoothLeScanner.java b/framework/java/android/bluetooth/le/BluetoothLeScanner.java index 41c4f5ad5d..19fab37a10 100644 --- a/framework/java/android/bluetooth/le/BluetoothLeScanner.java +++ b/framework/java/android/bluetooth/le/BluetoothLeScanner.java @@ -62,8 +62,8 @@ public final class BluetoothLeScanner { * error. In case of error, {@link #EXTRA_ERROR_CODE} will contain the error code and this * extra will not be available. */ - public static final String EXTRA_LIST_SCAN_RESULT - = "android.bluetooth.le.extra.LIST_SCAN_RESULT"; + public static final String EXTRA_LIST_SCAN_RESULT = + "android.bluetooth.le.extra.LIST_SCAN_RESULT"; /** * Optional extra indicating the error code, if any. The error code will be one of the @@ -419,8 +419,8 @@ public final class BluetoothLeScanner { */ @Override public void onScannerRegistered(int status, int scannerId) { - Log.d(TAG, "onScannerRegistered() - status=" + status + - " scannerId=" + scannerId + " mScannerId=" + mScannerId); + Log.d(TAG, "onScannerRegistered() - status=" + status + + " scannerId=" + scannerId + " mScannerId=" + mScannerId); synchronized (this) { if (status == BluetoothGatt.GATT_SUCCESS) { try { @@ -481,8 +481,7 @@ public final class BluetoothLeScanner { @Override public void onFoundOrLost(final boolean onFound, final ScanResult scanResult) { if (VDBG) { - Log.d(TAG, "onFoundOrLost() - onFound = " + onFound + - " " + scanResult.toString()); + Log.d(TAG, "onFoundOrLost() - onFound = " + onFound + " " + scanResult.toString()); } // Check null in case the scan has been stopped @@ -574,8 +573,8 @@ public final class BluetoothLeScanner { if ((callbackType & ScanSettings.CALLBACK_TYPE_FIRST_MATCH) != 0 || (callbackType & ScanSettings.CALLBACK_TYPE_MATCH_LOST) != 0) { // For onlost/onfound, we required hw support be available - return (mBluetoothAdapter.isOffloadedFilteringSupported() && - mBluetoothAdapter.isHardwareTrackingFiltersAvailable()); + return (mBluetoothAdapter.isOffloadedFilteringSupported() + && mBluetoothAdapter.isHardwareTrackingFiltersAvailable()); } return true; } |