From 2992cd084cd5cfd9ef253c37ef269d6c75e7e144 Mon Sep 17 00:00:00 2001 From: Jack He Date: Tue, 22 Aug 2017 21:21:23 -0700 Subject: 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 --- core/java/android/bluetooth/OobData.java | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'core/java/android/bluetooth/OobData.java') diff --git a/core/java/android/bluetooth/OobData.java b/core/java/android/bluetooth/OobData.java index 505cc5667de5..d63257286975 100644 --- a/core/java/android/bluetooth/OobData.java +++ b/core/java/android/bluetooth/OobData.java @@ -28,13 +28,13 @@ import android.os.Parcelable; * @hide */ public class OobData implements Parcelable { - private byte[] leBluetoothDeviceAddress; - private byte[] securityManagerTk; - private byte[] leSecureConnectionsConfirmation; - private byte[] leSecureConnectionsRandom; + private byte[] mLeBluetoothDeviceAddress; + private byte[] mSecurityManagerTk; + private byte[] mLeSecureConnectionsConfirmation; + private byte[] mLeSecureConnectionsRandom; public byte[] getLeBluetoothDeviceAddress() { - return leBluetoothDeviceAddress; + return mLeBluetoothDeviceAddress; } /** @@ -43,11 +43,11 @@ public class OobData implements Parcelable { * a detailed description. */ public void setLeBluetoothDeviceAddress(byte[] leBluetoothDeviceAddress) { - this.leBluetoothDeviceAddress = leBluetoothDeviceAddress; + mLeBluetoothDeviceAddress = leBluetoothDeviceAddress; } public byte[] getSecurityManagerTk() { - return securityManagerTk; + return mSecurityManagerTk; } /** @@ -56,49 +56,50 @@ public class OobData implements Parcelable { * Part A 1.8 for a detailed description. */ public void setSecurityManagerTk(byte[] securityManagerTk) { - this.securityManagerTk = securityManagerTk; + mSecurityManagerTk = securityManagerTk; } public byte[] getLeSecureConnectionsConfirmation() { - return leSecureConnectionsConfirmation; + return mLeSecureConnectionsConfirmation; } public void setLeSecureConnectionsConfirmation(byte[] leSecureConnectionsConfirmation) { - this.leSecureConnectionsConfirmation = leSecureConnectionsConfirmation; + mLeSecureConnectionsConfirmation = leSecureConnectionsConfirmation; } public byte[] getLeSecureConnectionsRandom() { - return leSecureConnectionsRandom; + return mLeSecureConnectionsRandom; } public void setLeSecureConnectionsRandom(byte[] leSecureConnectionsRandom) { - this.leSecureConnectionsRandom = leSecureConnectionsRandom; + mLeSecureConnectionsRandom = leSecureConnectionsRandom; } public OobData() { } private OobData(Parcel in) { - leBluetoothDeviceAddress = in.createByteArray(); - securityManagerTk = in.createByteArray(); - leSecureConnectionsConfirmation = in.createByteArray(); - leSecureConnectionsRandom = in.createByteArray(); + mLeBluetoothDeviceAddress = in.createByteArray(); + mSecurityManagerTk = in.createByteArray(); + mLeSecureConnectionsConfirmation = in.createByteArray(); + mLeSecureConnectionsRandom = in.createByteArray(); } + @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel out, int flags) { - out.writeByteArray(leBluetoothDeviceAddress); - out.writeByteArray(securityManagerTk); - out.writeByteArray(leSecureConnectionsConfirmation); - out.writeByteArray(leSecureConnectionsRandom); + out.writeByteArray(mLeBluetoothDeviceAddress); + out.writeByteArray(mSecurityManagerTk); + out.writeByteArray(mLeSecureConnectionsConfirmation); + out.writeByteArray(mLeSecureConnectionsRandom); } - public static final Parcelable.Creator CREATOR - = new Parcelable.Creator() { + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { public OobData createFromParcel(Parcel in) { return new OobData(in); } @@ -107,4 +108,4 @@ public class OobData implements Parcelable { return new OobData[size]; } }; -} \ No newline at end of file +} -- cgit v1.2.3