| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.net; |
| 18 |
|
| 19 |
import android.os.Parcel; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
public class WifiLinkQualityInfo extends LinkQualityInfo { |
| 27 |
|
| 28 |
|
| 29 |
private int mType = UNKNOWN_INT; |
| 30 |
|
| 31 |
private String mBssid; |
| 32 |
|
| 33 |
|
| 34 |
private int mRssi = UNKNOWN_INT; |
| 35 |
|
| 36 |
|
| 37 |
private long mTxGood = UNKNOWN_LONG; |
| 38 |
private long mTxBad = UNKNOWN_LONG; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
@Override |
| 45 |
public void writeToParcel(Parcel dest, int flags) { |
| 46 |
super.writeToParcel(dest, flags, OBJECT_TYPE_WIFI_LINK_QUALITY_INFO); |
| 47 |
|
| 48 |
dest.writeInt(mType); |
| 49 |
dest.writeInt(mRssi); |
| 50 |
dest.writeLong(mTxGood); |
| 51 |
dest.writeLong(mTxBad); |
| 52 |
|
| 53 |
dest.writeString(mBssid); |
| 54 |
} |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
public static WifiLinkQualityInfo createFromParcelBody(Parcel in) { |
| 61 |
WifiLinkQualityInfo li = new WifiLinkQualityInfo(); |
| 62 |
|
| 63 |
li.initializeFromParcel(in); |
| 64 |
|
| 65 |
li.mType = in.readInt(); |
| 66 |
li.mRssi = in.readInt(); |
| 67 |
li.mTxGood = in.readLong(); |
| 68 |
li.mTxBad = in.readLong(); |
| 69 |
|
| 70 |
li.mBssid = in.readString(); |
| 71 |
|
| 72 |
return li; |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
public int getType() { |
| 80 |
return mType; |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
public void setType(int type) { |
| 87 |
mType = type; |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
public String getBssid() { |
| 95 |
return mBssid; |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
public void setBssid(String bssid) { |
| 102 |
mBssid = bssid; |
| 103 |
} |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
public int getRssi() { |
| 110 |
return mRssi; |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
public void setRssi(int rssi) { |
| 117 |
mRssi = rssi; |
| 118 |
} |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
public long getTxGood() { |
| 125 |
return mTxGood; |
| 126 |
} |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
public void setTxGood(long txGood) { |
| 132 |
mTxGood = txGood; |
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
public long getTxBad() { |
| 140 |
return mTxBad; |
| 141 |
} |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
public void setTxBad(long txBad) { |
| 147 |
mTxBad = txBad; |
| 148 |
} |
| 149 |
} |