Fix checkstyle errors (1/2)
* Automatic style corrections through IDE
Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
diff --git a/core/java/android/bluetooth/SdpMasRecord.java b/core/java/android/bluetooth/SdpMasRecord.java
index fa164c0..b202e53 100644
--- a/core/java/android/bluetooth/SdpMasRecord.java
+++ b/core/java/android/bluetooth/SdpMasRecord.java
@@ -26,20 +26,21 @@
private final int mSupportedFeatures;
private final int mSupportedMessageTypes;
private final String mServiceName;
+
public static final class MessageType {
- public static final int EMAIL = 0x01;
- public static final int SMS_GSM = 0x02;
+ public static final int EMAIL = 0x01;
+ public static final int SMS_GSM = 0x02;
public static final int SMS_CDMA = 0x04;
- public static final int MMS = 0x08;
+ 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){
+ 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;
@@ -49,7 +50,7 @@
this.mServiceName = service_name;
}
- public SdpMasRecord(Parcel in){
+ public SdpMasRecord(Parcel in) {
this.mMasInstanceId = in.readInt();
this.mL2capPsm = in.readInt();
this.mRfcommChannelNumber = in.readInt();
@@ -58,6 +59,7 @@
this.mSupportedMessageTypes = in.readInt();
this.mServiceName = in.readString();
}
+
@Override
public int describeContents() {
// TODO Auto-generated method stub
@@ -87,11 +89,11 @@
public int getSupportedMessageTypes() {
return mSupportedMessageTypes;
}
-
+
public boolean msgSupported(int msg) {
return (mSupportedMessageTypes & msg) != 0;
}
-
+
public String getServiceName() {
return mServiceName;
}
@@ -108,29 +110,30 @@
dest.writeString(this.mServiceName);
}
+
@Override
- public String toString(){
+ public String toString() {
String ret = "Bluetooth MAS SDP Record:\n";
- if(mMasInstanceId != -1){
+ if (mMasInstanceId != -1) {
ret += "Mas Instance Id: " + mMasInstanceId + "\n";
}
- if(mRfcommChannelNumber != -1){
+ if (mRfcommChannelNumber != -1) {
ret += "RFCOMM Chan Number: " + mRfcommChannelNumber + "\n";
}
- if(mL2capPsm != -1){
+ if (mL2capPsm != -1) {
ret += "L2CAP PSM: " + mL2capPsm + "\n";
}
- if(mServiceName != null){
+ if (mServiceName != null) {
ret += "Service Name: " + mServiceName + "\n";
}
- if(mProfileVersion != -1){
+ if (mProfileVersion != -1) {
ret += "Profile version: " + mProfileVersion + "\n";
}
- if(mSupportedMessageTypes != -1){
+ if (mSupportedMessageTypes != -1) {
ret += "Supported msg types: " + mSupportedMessageTypes + "\n";
}
- if(mSupportedFeatures != -1){
+ if (mSupportedFeatures != -1) {
ret += "Supported features: " + mSupportedFeatures + "\n";
}
return ret;
@@ -140,6 +143,7 @@
public SdpMasRecord createFromParcel(Parcel in) {
return new SdpMasRecord(in);
}
+
public SdpRecord[] newArray(int size) {
return new SdpRecord[size];
}