Methods Summary |
---|
public int | describeContents()
return 0;
|
public boolean | equals(java.lang.Object obj)
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ScanResult other = (ScanResult) obj;
return Objects.equals(mDevice, other.mDevice) && (mRssi == other.mRssi) &&
Objects.equals(mScanRecord, other.mScanRecord)
&& (mTimestampNanos == other.mTimestampNanos);
|
public android.bluetooth.BluetoothDevice | getDevice()Returns the remote bluetooth device identified by the bluetooth device address.
return mDevice;
|
public int | getRssi()Returns the received signal strength in dBm. The valid range is [-127, 127].
return mRssi;
|
public ScanRecord | getScanRecord()Returns the scan record, which is a combination of advertisement and scan response.
return mScanRecord;
|
public long | getTimestampNanos()Returns timestamp since boot when the scan record was observed.
return mTimestampNanos;
|
public int | hashCode()
return Objects.hash(mDevice, mRssi, mScanRecord, mTimestampNanos);
|
private void | readFromParcel(android.os.Parcel in)
if (in.readInt() == 1) {
mDevice = BluetoothDevice.CREATOR.createFromParcel(in);
}
if (in.readInt() == 1) {
mScanRecord = ScanRecord.parseFromBytes(in.createByteArray());
}
mRssi = in.readInt();
mTimestampNanos = in.readLong();
|
public java.lang.String | toString()
return "ScanResult{" + "mDevice=" + mDevice + ", mScanRecord="
+ Objects.toString(mScanRecord) + ", mRssi=" + mRssi + ", mTimestampNanos="
+ mTimestampNanos + '}";
|
public void | writeToParcel(android.os.Parcel dest, int flags)
if (mDevice != null) {
dest.writeInt(1);
mDevice.writeToParcel(dest, flags);
} else {
dest.writeInt(0);
}
if (mScanRecord != null) {
dest.writeInt(1);
dest.writeByteArray(mScanRecord.getBytes());
} else {
dest.writeInt(0);
}
dest.writeInt(mRssi);
dest.writeLong(mTimestampNanos);
|