summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothMapClient.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2017-08-22 21:21:23 -0700
committerJack He <siyuanh@google.com>2017-08-24 19:09:58 +0000
commit9e045d26d0128826b40520f523307d8d16473779 (patch)
tree8299c300f3b4dbc2a5360c3319ac41bf1b389e55 /framework/java/android/bluetooth/BluetoothMapClient.java
parent910201beb0bde1dcf6b33e4ec5d1eb60042419d8 (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/BluetoothMapClient.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothMapClient.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/framework/java/android/bluetooth/BluetoothMapClient.java b/framework/java/android/bluetooth/BluetoothMapClient.java
index 09dd5ad62b..3e0c36548c 100644
--- a/framework/java/android/bluetooth/BluetoothMapClient.java
+++ b/framework/java/android/bluetooth/BluetoothMapClient.java
@@ -72,7 +72,7 @@ public final class BluetoothMapClient implements BluetoothProfile {
/** Connection canceled before completion. */
public static final int RESULT_CANCELED = 2;
- final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
+ private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
new IBluetoothStateChangeCallback.Stub() {
public void onBluetoothStateChange(boolean up) {
if (DBG) Log.d(TAG, "onBluetoothStateChange: up=" + up);
@@ -216,8 +216,7 @@ public final class BluetoothMapClient implements BluetoothProfile {
*/
public boolean disconnect(BluetoothDevice device) {
if (DBG) Log.d(TAG, "disconnect(" + device + ")");
- if (mService != null && isEnabled() &&
- isValidDevice(device)) {
+ if (mService != null && isEnabled() && isValidDevice(device)) {
try {
return mService.disconnect(device);
} catch (RemoteException e) {
@@ -276,8 +275,7 @@ public final class BluetoothMapClient implements BluetoothProfile {
@Override
public int getConnectionState(BluetoothDevice device) {
if (DBG) Log.d(TAG, "getConnectionState(" + device + ")");
- if (mService != null && isEnabled() &&
- isValidDevice(device)) {
+ if (mService != null && isEnabled() && isValidDevice(device)) {
try {
return mService.getConnectionState(device);
} catch (RemoteException e) {
@@ -300,10 +298,9 @@ public final class BluetoothMapClient implements BluetoothProfile {
*/
public boolean setPriority(BluetoothDevice device, int priority) {
if (DBG) Log.d(TAG, "setPriority(" + device + ", " + priority + ")");
- if (mService != null && isEnabled() &&
- isValidDevice(device)) {
- if (priority != BluetoothProfile.PRIORITY_OFF &&
- priority != BluetoothProfile.PRIORITY_ON) {
+ if (mService != null && isEnabled() && isValidDevice(device)) {
+ if (priority != BluetoothProfile.PRIORITY_OFF
+ && priority != BluetoothProfile.PRIORITY_ON) {
return false;
}
try {
@@ -329,8 +326,7 @@ public final class BluetoothMapClient implements BluetoothProfile {
*/
public int getPriority(BluetoothDevice device) {
if (VDBG) Log.d(TAG, "getPriority(" + device + ")");
- if (mService != null && isEnabled() &&
- isValidDevice(device)) {
+ if (mService != null && isEnabled() && isValidDevice(device)) {
try {
return mService.getPriority(device);
} catch (RemoteException e) {