summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/le/ScanResult.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2017-08-22 16:06:54 -0700
committerJack He <siyuanh@google.com>2017-08-24 19:09:48 +0000
commit910201beb0bde1dcf6b33e4ec5d1eb60042419d8 (patch)
tree9e7b8aa471daaed62a7e16a6b8cbd10a0a533e8a /framework/java/android/bluetooth/le/ScanResult.java
parent931010f176faa894f06051c57290f7723dfbcd49 (diff)
Fix checkstyle errors (1/2)
* Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
Diffstat (limited to 'framework/java/android/bluetooth/le/ScanResult.java')
-rw-r--r--framework/java/android/bluetooth/le/ScanResult.java61
1 files changed, 35 insertions, 26 deletions
diff --git a/framework/java/android/bluetooth/le/ScanResult.java b/framework/java/android/bluetooth/le/ScanResult.java
index e552398e9e..774382243b 100644
--- a/framework/java/android/bluetooth/le/ScanResult.java
+++ b/framework/java/android/bluetooth/le/ScanResult.java
@@ -98,7 +98,8 @@ public final class ScanResult implements Parcelable {
* @param scanRecord Scan record including both advertising data and scan response data.
* @param rssi Received signal strength.
* @param timestampNanos Timestamp at which the scan result was observed.
- * @deprecated use {@link #ScanResult(BluetoothDevice, int, int, int, int, int, int, int, ScanRecord, long)}
+ * @deprecated use {@link #ScanResult(BluetoothDevice, int, int, int, int, int, int, int,
+ * ScanRecord, long)}
*/
public ScanResult(BluetoothDevice device, ScanRecord scanRecord, int rssi,
long timestampNanos) {
@@ -129,8 +130,8 @@ public final class ScanResult implements Parcelable {
* @param timestampNanos Timestamp at which the scan result was observed.
*/
public ScanResult(BluetoothDevice device, int eventType, int primaryPhy, int secondaryPhy,
- int advertisingSid, int txPower, int rssi, int periodicAdvertisingInterval,
- ScanRecord scanRecord, long timestampNanos) {
+ int advertisingSid, int txPower, int rssi, int periodicAdvertisingInterval,
+ ScanRecord scanRecord, long timestampNanos) {
mDevice = device;
mEventType = eventType;
mPrimaryPhy = primaryPhy;
@@ -254,7 +255,9 @@ public final class ScanResult implements Parcelable {
* Can be one of {@link BluetoothDevice#PHY_LE_1M} or
* {@link BluetoothDevice#PHY_LE_CODED}.
*/
- public int getPrimaryPhy() { return mPrimaryPhy; }
+ public int getPrimaryPhy() {
+ return mPrimaryPhy;
+ }
/**
* Returns the secondary Physical Layer
@@ -264,21 +267,27 @@ public final class ScanResult implements Parcelable {
* or {@link ScanResult#PHY_UNUSED} - if the advertisement
* was not received on a secondary physical channel.
*/
- public int getSecondaryPhy() { return mSecondaryPhy; }
+ public int getSecondaryPhy() {
+ return mSecondaryPhy;
+ }
/**
* Returns the advertising set id.
* May return {@link ScanResult#SID_NOT_PRESENT} if
* no set id was is present.
*/
- public int getAdvertisingSid() { return mAdvertisingSid; }
+ public int getAdvertisingSid() {
+ return mAdvertisingSid;
+ }
/**
* Returns the transmit power in dBm.
* Valid range is [-127, 126]. A value of {@link ScanResult#TX_POWER_NOT_PRESENT}
* indicates that the TX power is not present.
*/
- public int getTxPower() { return mTxPower; }
+ public int getTxPower() {
+ return mTxPower;
+ }
/**
* Returns the periodic advertising interval in units of 1.25ms.
@@ -293,9 +302,9 @@ public final class ScanResult implements Parcelable {
@Override
public int hashCode() {
return Objects.hash(mDevice, mRssi, mScanRecord, mTimestampNanos,
- mEventType, mPrimaryPhy, mSecondaryPhy,
- mAdvertisingSid, mTxPower,
- mPeriodicAdvertisingInterval);
+ mEventType, mPrimaryPhy, mSecondaryPhy,
+ mAdvertisingSid, mTxPower,
+ mPeriodicAdvertisingInterval);
}
@Override
@@ -308,33 +317,33 @@ public final class ScanResult implements Parcelable {
}
ScanResult other = (ScanResult) obj;
return Objects.equals(mDevice, other.mDevice) && (mRssi == other.mRssi) &&
- Objects.equals(mScanRecord, other.mScanRecord) &&
- (mTimestampNanos == other.mTimestampNanos) &&
- mEventType == other.mEventType &&
- mPrimaryPhy == other.mPrimaryPhy &&
- mSecondaryPhy == other.mSecondaryPhy &&
- mAdvertisingSid == other.mAdvertisingSid &&
- mTxPower == other.mTxPower &&
- mPeriodicAdvertisingInterval == other.mPeriodicAdvertisingInterval;
+ Objects.equals(mScanRecord, other.mScanRecord) &&
+ (mTimestampNanos == other.mTimestampNanos) &&
+ mEventType == other.mEventType &&
+ mPrimaryPhy == other.mPrimaryPhy &&
+ mSecondaryPhy == other.mSecondaryPhy &&
+ mAdvertisingSid == other.mAdvertisingSid &&
+ mTxPower == other.mTxPower &&
+ mPeriodicAdvertisingInterval == other.mPeriodicAdvertisingInterval;
}
@Override
public String toString() {
- return "ScanResult{" + "device=" + mDevice + ", scanRecord=" +
- Objects.toString(mScanRecord) + ", rssi=" + mRssi +
- ", timestampNanos=" + mTimestampNanos + ", eventType=" + mEventType +
- ", primaryPhy=" + mPrimaryPhy + ", secondaryPhy=" + mSecondaryPhy +
- ", advertisingSid=" + mAdvertisingSid + ", txPower=" + mTxPower +
- ", periodicAdvertisingInterval=" + mPeriodicAdvertisingInterval + '}';
+ return "ScanResult{" + "device=" + mDevice + ", scanRecord=" +
+ Objects.toString(mScanRecord) + ", rssi=" + mRssi +
+ ", timestampNanos=" + mTimestampNanos + ", eventType=" + mEventType +
+ ", primaryPhy=" + mPrimaryPhy + ", secondaryPhy=" + mSecondaryPhy +
+ ", advertisingSid=" + mAdvertisingSid + ", txPower=" + mTxPower +
+ ", periodicAdvertisingInterval=" + mPeriodicAdvertisingInterval + '}';
}
public static final Parcelable.Creator<ScanResult> CREATOR = new Creator<ScanResult>() {
- @Override
+ @Override
public ScanResult createFromParcel(Parcel source) {
return new ScanResult(source);
}
- @Override
+ @Override
public ScanResult[] newArray(int size) {
return new ScanResult[size];
}