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
diff --git a/core/java/android/bluetooth/SdpMasRecord.java b/core/java/android/bluetooth/SdpMasRecord.java
index b202e53..72d4938 100644
--- a/core/java/android/bluetooth/SdpMasRecord.java
+++ b/core/java/android/bluetooth/SdpMasRecord.java
@@ -27,6 +27,7 @@
private final int mSupportedMessageTypes;
private final String mServiceName;
+ /** Message type */
public static final class MessageType {
public static final int EMAIL = 0x01;
public static final int SMS_GSM = 0x02;
@@ -34,30 +35,30 @@
public static final int MMS = 0x08;
}
- public SdpMasRecord(int mas_instance_id,
- int l2cap_psm,
- int rfcomm_channel_number,
- int profile_version,
- int supported_features,
- int supported_message_types,
- String service_name) {
- this.mMasInstanceId = mas_instance_id;
- this.mL2capPsm = l2cap_psm;
- this.mRfcommChannelNumber = rfcomm_channel_number;
- this.mProfileVersion = profile_version;
- this.mSupportedFeatures = supported_features;
- this.mSupportedMessageTypes = supported_message_types;
- this.mServiceName = service_name;
+ public SdpMasRecord(int masInstanceId,
+ int l2capPsm,
+ int rfcommChannelNumber,
+ int profileVersion,
+ int supportedFeatures,
+ int supportedMessageTypes,
+ String serviceName) {
+ mMasInstanceId = masInstanceId;
+ mL2capPsm = l2capPsm;
+ mRfcommChannelNumber = rfcommChannelNumber;
+ mProfileVersion = profileVersion;
+ mSupportedFeatures = supportedFeatures;
+ mSupportedMessageTypes = supportedMessageTypes;
+ mServiceName = serviceName;
}
public SdpMasRecord(Parcel in) {
- this.mMasInstanceId = in.readInt();
- this.mL2capPsm = in.readInt();
- this.mRfcommChannelNumber = in.readInt();
- this.mProfileVersion = in.readInt();
- this.mSupportedFeatures = in.readInt();
- this.mSupportedMessageTypes = in.readInt();
- this.mServiceName = in.readString();
+ mMasInstanceId = in.readInt();
+ mL2capPsm = in.readInt();
+ mRfcommChannelNumber = in.readInt();
+ mProfileVersion = in.readInt();
+ mSupportedFeatures = in.readInt();
+ mSupportedMessageTypes = in.readInt();
+ mServiceName = in.readString();
}
@Override
@@ -100,15 +101,13 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
-
- dest.writeInt(this.mMasInstanceId);
- dest.writeInt(this.mL2capPsm);
- dest.writeInt(this.mRfcommChannelNumber);
- dest.writeInt(this.mProfileVersion);
- dest.writeInt(this.mSupportedFeatures);
- dest.writeInt(this.mSupportedMessageTypes);
- dest.writeString(this.mServiceName);
-
+ dest.writeInt(mMasInstanceId);
+ dest.writeInt(mL2capPsm);
+ dest.writeInt(mRfcommChannelNumber);
+ dest.writeInt(mProfileVersion);
+ dest.writeInt(mSupportedFeatures);
+ dest.writeInt(mSupportedMessageTypes);
+ dest.writeString(mServiceName);
}
@Override