Created
December 6, 2013 16:59
-
-
Save yareally/7828265 to your computer and use it in GitHub Desktop.
Crappy signal layer from an HTC Thunderbolt running ICS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package android.telephony; | |
import android.os.Bundle; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.os.Parcelable.Creator; | |
import android.util.Log; | |
public class SignalStrength | |
implements Parcelable, HtcIfSignalStrength | |
{ | |
public static final Parcelable.Creator<SignalStrength> CREATOR = new Parcelable.Creator() | |
{ | |
public SignalStrength createFromParcel(Parcel paramAnonymousParcel) | |
{ | |
return new SignalStrength(paramAnonymousParcel); | |
} | |
public SignalStrength[] newArray(int paramAnonymousInt) | |
{ | |
return new SignalStrength[paramAnonymousInt]; | |
} | |
}; | |
private static final boolean DBG = false; | |
public static final int INVALID_SNR = 2147483647; | |
private static final String LOG_TAG = "SignalStrength"; | |
public static final int NUM_SIGNAL_STRENGTH_BINS = 5; | |
public static final int SIGNAL_STRENGTH_GOOD = 3; | |
public static final int SIGNAL_STRENGTH_GREAT = 4; | |
public static final int SIGNAL_STRENGTH_MODERATE = 2; | |
public static final String[] SIGNAL_STRENGTH_NAMES = { "none", "poor", "moderate", "good", "great" }; | |
public static final int SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0; | |
public static final int SIGNAL_STRENGTH_POOR = 1; | |
private boolean isGsm; | |
private int mCdmaDbm; | |
private int mCdmaEcio; | |
private int mEvdoDbm; | |
private int mEvdoEcio; | |
private int mEvdoSignalBar; | |
private int mEvdoSnr; | |
private int mGsmBitErrorRate; | |
private int mGsmEcno; | |
private int mGsmSignalDbm; | |
private int mGsmSignalStrength; | |
private int mHtcLteRsrp; | |
private int mHtcLteRsrq; | |
private int mLteCqi; | |
private int mLteRsrp; | |
private int mLteRsrq; | |
private int mLteRssnr; | |
private int mLteSignalStrength; | |
public SignalStrength() | |
{ | |
this.mGsmSignalStrength = 99; | |
this.mGsmBitErrorRate = -1; | |
this.mCdmaDbm = -1; | |
this.mCdmaEcio = -1; | |
this.mEvdoDbm = -1; | |
this.mEvdoEcio = -1; | |
this.mEvdoSnr = -1; | |
this.mLteSignalStrength = -1; | |
this.mLteRsrp = -1; | |
this.mLteRsrq = -1; | |
this.mLteRssnr = 2147483647; | |
this.mLteCqi = -1; | |
this.isGsm = true; | |
this.mGsmSignalDbm = -1; | |
this.mGsmEcno = -1; | |
this.mEvdoSignalBar = -1; | |
this.mHtcLteRsrp = -1; | |
this.mHtcLteRsrq = -1; | |
} | |
public SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, int paramInt16, int paramInt17, boolean paramBoolean) | |
{ | |
this.mGsmSignalStrength = paramInt1; | |
this.mGsmBitErrorRate = paramInt2; | |
this.mCdmaDbm = paramInt3; | |
this.mCdmaEcio = paramInt4; | |
this.mEvdoDbm = paramInt5; | |
this.mEvdoEcio = paramInt6; | |
this.mEvdoSnr = paramInt7; | |
this.mLteSignalStrength = paramInt8; | |
this.mLteRsrp = paramInt9; | |
this.mLteRsrq = paramInt10; | |
this.mLteRssnr = paramInt11; | |
this.mLteCqi = paramInt12; | |
this.mHtcLteRsrp = paramInt16; | |
this.mHtcLteRsrq = paramInt17; | |
this.isGsm = paramBoolean; | |
initHtcAddFields(paramInt13, paramInt14, paramInt15); | |
} | |
public SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, boolean paramBoolean) | |
{ | |
this.mGsmSignalStrength = paramInt1; | |
this.mGsmBitErrorRate = paramInt2; | |
this.mCdmaDbm = paramInt3; | |
this.mCdmaEcio = paramInt4; | |
this.mEvdoDbm = paramInt5; | |
this.mEvdoEcio = paramInt6; | |
this.mEvdoSnr = paramInt7; | |
this.mLteSignalStrength = paramInt8; | |
this.mLteRsrp = paramInt9; | |
this.mLteRsrq = paramInt10; | |
this.mLteRssnr = paramInt11; | |
this.mLteCqi = paramInt12; | |
this.isGsm = paramBoolean; | |
initHtcAddFields(paramInt13, paramInt14, paramInt15); | |
} | |
public SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, boolean paramBoolean) | |
{ | |
this.mGsmSignalStrength = paramInt1; | |
this.mGsmBitErrorRate = paramInt2; | |
this.mCdmaDbm = paramInt3; | |
this.mCdmaEcio = paramInt4; | |
this.mEvdoDbm = paramInt5; | |
this.mEvdoEcio = paramInt6; | |
this.mEvdoSnr = paramInt7; | |
this.mLteSignalStrength = paramInt8; | |
this.mLteRsrp = paramInt9; | |
this.mLteRsrq = paramInt10; | |
this.mLteRssnr = paramInt11; | |
this.mLteCqi = paramInt12; | |
this.isGsm = paramBoolean; | |
} | |
public SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, boolean paramBoolean) | |
{ | |
this.mLteSignalStrength = paramInt8; | |
this.mLteRsrp = paramInt9; | |
this.mLteCqi = paramInt10; | |
internal_SignalStrength(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramBoolean); | |
this.mEvdoSignalBar = paramInt2; | |
} | |
public SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean) | |
{ | |
this(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, -1, -1, -1, -1, -1, -1, -1, -1, paramBoolean); | |
} | |
public SignalStrength(Parcel paramParcel) | |
{ | |
this.mGsmSignalStrength = paramParcel.readInt(); | |
this.mGsmBitErrorRate = paramParcel.readInt(); | |
this.mCdmaDbm = paramParcel.readInt(); | |
this.mCdmaEcio = paramParcel.readInt(); | |
this.mEvdoDbm = paramParcel.readInt(); | |
this.mEvdoEcio = paramParcel.readInt(); | |
this.mEvdoSnr = paramParcel.readInt(); | |
this.mLteSignalStrength = paramParcel.readInt(); | |
this.mLteRsrp = paramParcel.readInt(); | |
this.mLteRsrq = paramParcel.readInt(); | |
this.mLteRssnr = paramParcel.readInt(); | |
this.mLteCqi = paramParcel.readInt(); | |
if (paramParcel.readInt() != 0); | |
for (boolean bool = true; ; bool = false) | |
{ | |
this.isGsm = bool; | |
readHtcAddedFieldsFrom(paramParcel); | |
return; | |
} | |
} | |
public SignalStrength(SignalStrength paramSignalStrength) | |
{ | |
copyFrom(paramSignalStrength); | |
} | |
private int calculateHtcAddedFieldsHashCode() | |
{ | |
return this.mGsmSignalDbm + this.mGsmEcno + this.mEvdoSignalBar + this.mHtcLteRsrp + this.mHtcLteRsrq; | |
} | |
private void copyHtcAddedFieldsFrom(SignalStrength paramSignalStrength) | |
{ | |
this.mGsmSignalDbm = paramSignalStrength.mGsmSignalDbm; | |
this.mGsmEcno = paramSignalStrength.mGsmEcno; | |
this.mEvdoSignalBar = paramSignalStrength.mEvdoSignalBar; | |
this.mHtcLteRsrp = paramSignalStrength.mHtcLteRsrp; | |
this.mHtcLteRsrq = paramSignalStrength.mHtcLteRsrq; | |
} | |
private boolean equalsHtcAddedFields(SignalStrength paramSignalStrength) | |
{ | |
return (this.mGsmSignalDbm == paramSignalStrength.mGsmSignalDbm) && (this.mGsmEcno == paramSignalStrength.mGsmEcno) && (this.mEvdoSignalBar == paramSignalStrength.mEvdoSignalBar) && (this.mHtcLteRsrp == paramSignalStrength.mHtcLteRsrp) && (this.mHtcLteRsrq == paramSignalStrength.mHtcLteRsrq); | |
} | |
private void fillHtcAddedFieldsInNotifierBundle(Bundle paramBundle) | |
{ | |
paramBundle.putInt("GsmSignalDbm", this.mGsmSignalDbm); | |
paramBundle.putInt("GsmEcno", this.mGsmEcno); | |
paramBundle.putInt("EvdoSignalBar", this.mEvdoSignalBar); | |
paramBundle.putInt("HtcLteRsrp", this.mHtcLteRsrp); | |
paramBundle.putInt("HtcLteRsrq", this.mHtcLteRsrq); | |
} | |
private String getHtcAddedFieldsString() | |
{ | |
return " " + this.mGsmSignalDbm + " " + this.mGsmEcno + " " + this.mEvdoSignalBar + " " + this.mHtcLteRsrp + " " + this.mHtcLteRsrq; | |
} | |
private void initHtcAddFields(int paramInt1, int paramInt2, int paramInt3) | |
{ | |
this.mGsmSignalDbm = paramInt1; | |
this.mGsmEcno = paramInt2; | |
this.mEvdoSignalBar = paramInt3; | |
} | |
private void internal_SignalStrength(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean) | |
{ | |
this.mGsmSignalStrength = paramInt1; | |
this.mGsmBitErrorRate = paramInt2; | |
this.mCdmaDbm = paramInt3; | |
this.mCdmaEcio = paramInt4; | |
this.mEvdoDbm = paramInt5; | |
this.mEvdoEcio = paramInt6; | |
this.mEvdoSnr = paramInt7; | |
this.isGsm = paramBoolean; | |
} | |
private static void log(String paramString) | |
{ | |
Log.w("SignalStrength", paramString); | |
} | |
public static SignalStrength newFromBundle(Bundle paramBundle) | |
{ | |
SignalStrength localSignalStrength = new SignalStrength(); | |
localSignalStrength.setFromNotifierBundle(paramBundle); | |
return localSignalStrength; | |
} | |
private void readHtcAddedFieldsFrom(Parcel paramParcel) | |
{ | |
this.mGsmSignalDbm = paramParcel.readInt(); | |
this.mGsmEcno = paramParcel.readInt(); | |
this.mEvdoSignalBar = paramParcel.readInt(); | |
this.mHtcLteRsrp = paramParcel.readInt(); | |
this.mHtcLteRsrq = paramParcel.readInt(); | |
} | |
private void setFromNotifierBundle(Bundle paramBundle) | |
{ | |
this.mGsmSignalStrength = paramBundle.getInt("GsmSignalStrength"); | |
this.mGsmBitErrorRate = paramBundle.getInt("GsmBitErrorRate"); | |
this.mCdmaDbm = paramBundle.getInt("CdmaDbm"); | |
this.mCdmaEcio = paramBundle.getInt("CdmaEcio"); | |
this.mEvdoDbm = paramBundle.getInt("EvdoDbm"); | |
this.mEvdoEcio = paramBundle.getInt("EvdoEcio"); | |
this.mEvdoSnr = paramBundle.getInt("EvdoSnr"); | |
this.mLteSignalStrength = paramBundle.getInt("LteSignalStrength"); | |
this.mLteRsrp = paramBundle.getInt("LteRsrp"); | |
this.mLteRsrq = paramBundle.getInt("LteRsrq"); | |
this.mLteRssnr = paramBundle.getInt("LteRssnr"); | |
this.mLteCqi = paramBundle.getInt("LteCqi"); | |
this.isGsm = paramBundle.getBoolean("isGsm"); | |
setHtcAddedFieldsFromNotifierBundle(paramBundle); | |
} | |
private void setHtcAddedFieldsFromNotifierBundle(Bundle paramBundle) | |
{ | |
this.mGsmSignalDbm = paramBundle.getInt("GsmSignalDbm"); | |
this.mGsmEcno = paramBundle.getInt("GsmEcno"); | |
this.mEvdoSignalBar = paramBundle.getInt("EvdoSignalBar"); | |
this.mHtcLteRsrp = paramBundle.getInt("HtcLteRsrp"); | |
this.mHtcLteRsrq = paramBundle.getInt("HtcLteRsrq"); | |
} | |
private void writeHtcAddedFieldsInto(Parcel paramParcel) | |
{ | |
paramParcel.writeInt(this.mGsmSignalDbm); | |
paramParcel.writeInt(this.mGsmEcno); | |
paramParcel.writeInt(this.mEvdoSignalBar); | |
paramParcel.writeInt(this.mHtcLteRsrp); | |
paramParcel.writeInt(this.mHtcLteRsrq); | |
} | |
protected void copyFrom(SignalStrength paramSignalStrength) | |
{ | |
this.mGsmSignalStrength = paramSignalStrength.mGsmSignalStrength; | |
this.mGsmBitErrorRate = paramSignalStrength.mGsmBitErrorRate; | |
this.mCdmaDbm = paramSignalStrength.mCdmaDbm; | |
this.mCdmaEcio = paramSignalStrength.mCdmaEcio; | |
this.mEvdoDbm = paramSignalStrength.mEvdoDbm; | |
this.mEvdoEcio = paramSignalStrength.mEvdoEcio; | |
this.mEvdoSnr = paramSignalStrength.mEvdoSnr; | |
this.mLteSignalStrength = paramSignalStrength.mLteSignalStrength; | |
this.mLteRsrp = paramSignalStrength.mLteRsrp; | |
this.mLteRsrq = paramSignalStrength.mLteRsrq; | |
this.mLteRssnr = paramSignalStrength.mLteRssnr; | |
this.mLteCqi = paramSignalStrength.mLteCqi; | |
this.isGsm = paramSignalStrength.isGsm; | |
copyHtcAddedFieldsFrom(paramSignalStrength); | |
} | |
public int describeContents() | |
{ | |
return 0; | |
} | |
public boolean equals(Object paramObject) | |
{ | |
boolean bool1 = true; | |
SignalStrength localSignalStrength; | |
try | |
{ | |
localSignalStrength = (SignalStrength)paramObject; | |
if (paramObject == null) | |
return false; | |
} | |
catch (ClassCastException localClassCastException) | |
{ | |
return false; | |
} | |
boolean bool2; | |
if ((this.mGsmSignalStrength == localSignalStrength.mGsmSignalStrength) && (this.mGsmBitErrorRate == localSignalStrength.mGsmBitErrorRate) && (this.mCdmaDbm == localSignalStrength.mCdmaDbm) && (this.mCdmaEcio == localSignalStrength.mCdmaEcio) && (this.mEvdoDbm == localSignalStrength.mEvdoDbm) && (this.mEvdoEcio == localSignalStrength.mEvdoEcio) && (this.mEvdoSnr == localSignalStrength.mEvdoSnr) && (this.mLteSignalStrength == localSignalStrength.mLteSignalStrength) && (this.mLteRsrp == localSignalStrength.mLteRsrp) && (this.mLteRsrq == localSignalStrength.mLteRsrq) && (this.mLteRssnr == localSignalStrength.mLteRssnr) && (this.mLteCqi == localSignalStrength.mLteCqi) && (this.isGsm == localSignalStrength.isGsm)) | |
{ | |
bool2 = bool1; | |
if ((!bool2) || (!equalsHtcAddedFields(localSignalStrength))) | |
break label198; | |
} | |
while (true) | |
{ | |
return bool1; | |
bool2 = false; | |
break; | |
label198: bool1 = false; | |
} | |
} | |
public void fillInNotifierBundle(Bundle paramBundle) | |
{ | |
paramBundle.putInt("GsmSignalStrength", this.mGsmSignalStrength); | |
paramBundle.putInt("GsmBitErrorRate", this.mGsmBitErrorRate); | |
paramBundle.putInt("CdmaDbm", this.mCdmaDbm); | |
paramBundle.putInt("CdmaEcio", this.mCdmaEcio); | |
paramBundle.putInt("EvdoDbm", this.mEvdoDbm); | |
paramBundle.putInt("EvdoEcio", this.mEvdoEcio); | |
paramBundle.putInt("EvdoSnr", this.mEvdoSnr); | |
paramBundle.putInt("LteSignalStrength", this.mLteSignalStrength); | |
paramBundle.putInt("LteRsrp", this.mLteRsrp); | |
paramBundle.putInt("LteRsrq", this.mLteRsrq); | |
paramBundle.putInt("LteRssnr", this.mLteRssnr); | |
paramBundle.putInt("LteCqi", this.mLteCqi); | |
paramBundle.putBoolean("isGsm", Boolean.valueOf(this.isGsm).booleanValue()); | |
fillHtcAddedFieldsInNotifierBundle(paramBundle); | |
} | |
public int getAsuLevel() | |
{ | |
if (this.isGsm) | |
{ | |
if ((this.mLteSignalStrength == -1) && (this.mLteRsrp == -1) && (this.mLteRsrq == -1) && (this.mLteCqi == -1)) | |
return getGsmAsuLevel(); | |
return getLteAsuLevel(); | |
} | |
int i = getCdmaAsuLevel(); | |
int j = getEvdoAsuLevel(); | |
if (j == 0) | |
return i; | |
if (i == 0) | |
return j; | |
if (i < j) | |
return i; | |
return j; | |
} | |
public int getCdmaAsuLevel() | |
{ | |
int i = getCdmaDbm(); | |
int j = getCdmaEcio(); | |
int k; | |
int m; | |
if (i >= -75) | |
{ | |
k = 16; | |
if (j < -90) | |
break label88; | |
m = 16; | |
} | |
while (true) | |
{ | |
if (k >= m) | |
break label146; | |
return k; | |
if (i >= -82) | |
{ | |
k = 8; | |
break; | |
} | |
if (i >= -90) | |
{ | |
k = 4; | |
break; | |
} | |
if (i >= -95) | |
{ | |
k = 2; | |
break; | |
} | |
if (i >= -100) | |
{ | |
k = 1; | |
break; | |
} | |
k = 99; | |
break; | |
label88: if (j >= -100) | |
m = 8; | |
else if (j >= -115) | |
m = 4; | |
else if (j >= -130) | |
m = 2; | |
else if (j >= -150) | |
m = 1; | |
else | |
m = 99; | |
} | |
label146: return m; | |
} | |
public int getCdmaDbm() | |
{ | |
return this.mCdmaDbm; | |
} | |
public int getCdmaEcio() | |
{ | |
return this.mCdmaEcio; | |
} | |
public int getCdmaLevel() | |
{ | |
int i = getCdmaDbm(); | |
int j = getCdmaEcio(); | |
int k; | |
int m; | |
if (i >= -75) | |
{ | |
k = 4; | |
if (j < -90) | |
break label73; | |
m = 4; | |
} | |
while (true) | |
{ | |
if (k >= m) | |
break label117; | |
return k; | |
if (i >= -85) | |
{ | |
k = 3; | |
break; | |
} | |
if (i >= -95) | |
{ | |
k = 2; | |
break; | |
} | |
if (i >= -100) | |
{ | |
k = 1; | |
break; | |
} | |
k = 0; | |
break; | |
label73: if (j >= -110) | |
m = 3; | |
else if (j >= -130) | |
m = 2; | |
else if (j >= -150) | |
m = 1; | |
else | |
m = 0; | |
} | |
label117: return m; | |
} | |
public int getDbm() | |
{ | |
if (isGsm()) | |
{ | |
if ((this.mLteSignalStrength == -1) && (this.mLteRsrp == -1) && (this.mLteRsrq == -1) && (this.mLteCqi == -1)) | |
return getGsmDbm(); | |
return getLteDbm(); | |
} | |
return getCdmaDbm(); | |
} | |
public int getEvdoAsuLevel() | |
{ | |
int i = getEvdoDbm(); | |
int j = getEvdoSnr(); | |
int k; | |
int m; | |
if (i >= -65) | |
{ | |
k = 16; | |
if (j < 7) | |
break label88; | |
m = 16; | |
} | |
while (true) | |
{ | |
if (k >= m) | |
break label141; | |
return k; | |
if (i >= -75) | |
{ | |
k = 8; | |
break; | |
} | |
if (i >= -85) | |
{ | |
k = 4; | |
break; | |
} | |
if (i >= -95) | |
{ | |
k = 2; | |
break; | |
} | |
if (i >= -105) | |
{ | |
k = 1; | |
break; | |
} | |
k = 99; | |
break; | |
label88: if (j >= 6) | |
m = 8; | |
else if (j >= 5) | |
m = 4; | |
else if (j >= 3) | |
m = 2; | |
else if (j >= 1) | |
m = 1; | |
else | |
m = 99; | |
} | |
label141: return m; | |
} | |
public int getEvdoDbm() | |
{ | |
return this.mEvdoDbm; | |
} | |
public int getEvdoEcio() | |
{ | |
return this.mEvdoEcio; | |
} | |
public int getEvdoLevel() | |
{ | |
int i = getEvdoDbm(); | |
int j = getEvdoSnr(); | |
int k; | |
int m; | |
if (i >= -65) | |
{ | |
k = 4; | |
if (j < 7) | |
break label73; | |
m = 4; | |
} | |
while (true) | |
{ | |
if (k >= m) | |
break label112; | |
return k; | |
if (i >= -75) | |
{ | |
k = 3; | |
break; | |
} | |
if (i >= -90) | |
{ | |
k = 2; | |
break; | |
} | |
if (i >= -105) | |
{ | |
k = 1; | |
break; | |
} | |
k = 0; | |
break; | |
label73: if (j >= 5) | |
m = 3; | |
else if (j >= 3) | |
m = 2; | |
else if (j >= 1) | |
m = 1; | |
else | |
m = 0; | |
} | |
label112: return m; | |
} | |
public int getEvdoSignalBar() | |
{ | |
return this.mEvdoSignalBar; | |
} | |
public int getEvdoSnr() | |
{ | |
return this.mEvdoSnr; | |
} | |
public int getGsmAsuLevel() | |
{ | |
return getGsmSignalStrength(); | |
} | |
public int getGsmBitErrorRate() | |
{ | |
return this.mGsmBitErrorRate; | |
} | |
public int getGsmDbm() | |
{ | |
int i = getGsmSignalStrength(); | |
if (i == 99); | |
for (int j = -1; j != -1; j = i) | |
return -113 + j * 2; | |
return -1; | |
} | |
public int getGsmEcno() | |
{ | |
return this.mGsmEcno; | |
} | |
public int getGsmLevel() | |
{ | |
int i = getGsmSignalStrength(); | |
if ((i <= 2) || (i == 99)) | |
return 0; | |
if (i >= 12) | |
return 4; | |
if (i >= 8) | |
return 3; | |
if (i >= 5) | |
return 2; | |
return 1; | |
} | |
public int getGsmSignalDbm() | |
{ | |
return this.mGsmSignalDbm; | |
} | |
public int getGsmSignalStrength() | |
{ | |
return this.mGsmSignalStrength; | |
} | |
public int getHtcLteRsrp() | |
{ | |
return this.mHtcLteRsrp; | |
} | |
public int getHtcLteRsrq() | |
{ | |
return this.mHtcLteRsrq; | |
} | |
public int getLevel() | |
{ | |
if (this.isGsm) | |
{ | |
if ((this.mLteSignalStrength == -1) && (this.mLteRsrp == -1) && (this.mLteRsrq == -1) && (this.mLteCqi == -1)) | |
return getGsmLevel(); | |
return getLteLevel(); | |
} | |
int i = getCdmaLevel(); | |
int j = getEvdoLevel(); | |
if (j == 0) | |
return getCdmaLevel(); | |
if (i == 0) | |
return getEvdoLevel(); | |
if (i < j) | |
return i; | |
return j; | |
} | |
public int getLteAsuLevel() | |
{ | |
int i = getLteDbm(); | |
if (i <= -140) | |
return 0; | |
if (i >= -43) | |
return 97; | |
return i + 140; | |
} | |
public int getLteCqi() | |
{ | |
return this.mLteCqi; | |
} | |
public int getLteDbm() | |
{ | |
return this.mLteRsrp; | |
} | |
public int getLteLevel() | |
{ | |
int i; | |
int j; | |
if (this.mLteRsrp == -1) | |
{ | |
i = 0; | |
if (this.mLteRssnr != 2147483647) | |
break label78; | |
j = 0; | |
} | |
while (true) | |
{ | |
if (this.mLteRsrp != -1) | |
break label125; | |
return j; | |
if (this.mLteRsrp >= -95) | |
{ | |
i = 4; | |
break; | |
} | |
if (this.mLteRsrp >= -105) | |
{ | |
i = 3; | |
break; | |
} | |
if (this.mLteRsrp >= -115) | |
{ | |
i = 2; | |
break; | |
} | |
i = 1; | |
break; | |
label78: if (this.mLteRssnr >= 45) | |
j = 4; | |
else if (this.mLteRssnr >= 10) | |
j = 3; | |
else if (this.mLteRssnr >= -30) | |
j = 2; | |
else | |
j = 1; | |
} | |
label125: if (this.mLteRssnr == 2147483647) | |
return i; | |
if (j < i) | |
return j; | |
return i; | |
} | |
public int getLteRsrp() | |
{ | |
return this.mLteRsrp; | |
} | |
public int getLteRsrq() | |
{ | |
return this.mLteRsrq; | |
} | |
public int getLteRssnr() | |
{ | |
return this.mLteRssnr; | |
} | |
public int getLteSignalStrength() | |
{ | |
return this.mLteSignalStrength; | |
} | |
public int hashCode() | |
{ | |
int i = 31 * this.mGsmSignalStrength + 31 * this.mGsmBitErrorRate + 31 * this.mCdmaDbm + 31 * this.mCdmaEcio + 31 * this.mEvdoDbm + 31 * this.mEvdoEcio + 31 * this.mEvdoSnr + 31 * this.mLteSignalStrength + 31 * this.mLteRsrp + 31 * this.mLteRsrq + 31 * this.mLteRssnr + 31 * this.mLteCqi; | |
if (this.isGsm); | |
for (int j = 1; ; j = 0) | |
return j + i + calculateHtcAddedFieldsHashCode(); | |
} | |
public boolean isGsm() | |
{ | |
return this.isGsm; | |
} | |
public void setHtcLteRsrp(int paramInt) | |
{ | |
this.mHtcLteRsrp = paramInt; | |
} | |
public void setHtcLteRsrq(int paramInt) | |
{ | |
this.mHtcLteRsrq = paramInt; | |
} | |
public void setLteRsrq(int paramInt) | |
{ | |
this.mLteRsrq = paramInt; | |
} | |
public void setLteRssnr(int paramInt) | |
{ | |
this.mLteRssnr = paramInt; | |
} | |
public String toString() | |
{ | |
StringBuilder localStringBuilder = new StringBuilder().append("SignalStrength: ").append(this.mGsmSignalStrength).append(" ").append(this.mGsmBitErrorRate).append(" ").append(this.mCdmaDbm).append(" ").append(this.mCdmaEcio).append(" ").append(this.mEvdoDbm).append(" ").append(this.mEvdoEcio).append(" ").append(this.mEvdoSnr).append(" ").append(this.mLteSignalStrength).append(" ").append(this.mLteRsrp).append(" ").append(this.mLteRsrq).append(" ").append(this.mLteRssnr).append(" ").append(this.mLteCqi).append(" "); | |
if (this.isGsm); | |
for (String str = "gsm|lte"; ; str = "cdma" + getHtcAddedFieldsString()) | |
return str; | |
} | |
public void writeToParcel(Parcel paramParcel, int paramInt) | |
{ | |
paramParcel.writeInt(this.mGsmSignalStrength); | |
paramParcel.writeInt(this.mGsmBitErrorRate); | |
paramParcel.writeInt(this.mCdmaDbm); | |
paramParcel.writeInt(this.mCdmaEcio); | |
paramParcel.writeInt(this.mEvdoDbm); | |
paramParcel.writeInt(this.mEvdoEcio); | |
paramParcel.writeInt(this.mEvdoSnr); | |
paramParcel.writeInt(this.mLteSignalStrength); | |
paramParcel.writeInt(this.mLteRsrp); | |
paramParcel.writeInt(this.mLteRsrq); | |
paramParcel.writeInt(this.mLteRssnr); | |
paramParcel.writeInt(this.mLteCqi); | |
if (this.isGsm); | |
for (int i = 1; ; i = 0) | |
{ | |
paramParcel.writeInt(i); | |
writeHtcAddedFieldsInto(paramParcel); | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment