summaryrefslogtreecommitdiff
path: root/core/java/android/bluetooth/OobData.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
commit2992cd084cd5cfd9ef253c37ef269d6c75e7e144 (patch)
treec9abf705b19e5989c34c124d533d7d214a65970a /core/java/android/bluetooth/OobData.java
parenta355e5efaf45a534ee6437aa4bae7d30f18c0ec2 (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/OobData.java')
-rw-r--r--core/java/android/bluetooth/OobData.java47
1 files changed, 24 insertions, 23 deletions
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<OobData> CREATOR
- = new Parcelable.Creator<OobData>() {
+ public static final Parcelable.Creator<OobData> CREATOR =
+ new Parcelable.Creator<OobData>() {
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
+}