Merge "Expose CellInfoTdscdma"
This commit is contained in:
@@ -42382,7 +42382,7 @@ package android.telephony {
|
||||
method @Nullable public String getMobileNetworkOperator();
|
||||
method public int getUarfcn();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityTdscdma> CREATOR;
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellIdentityTdscdma> CREATOR;
|
||||
}
|
||||
|
||||
public final class CellIdentityWcdma extends android.telephony.CellIdentity {
|
||||
@@ -42441,6 +42441,13 @@ package android.telephony {
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.CellInfoNr> CREATOR;
|
||||
}
|
||||
|
||||
public final class CellInfoTdscdma extends android.telephony.CellInfo implements android.os.Parcelable {
|
||||
method @NonNull public android.telephony.CellIdentityTdscdma getCellIdentity();
|
||||
method @NonNull public android.telephony.CellSignalStrengthTdscdma getCellSignalStrength();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellInfoTdscdma> CREATOR;
|
||||
}
|
||||
|
||||
public final class CellInfoWcdma extends android.telephony.CellInfo implements android.os.Parcelable {
|
||||
method public android.telephony.CellIdentityWcdma getCellIdentity();
|
||||
method public android.telephony.CellSignalStrengthWcdma getCellSignalStrength();
|
||||
@@ -42524,6 +42531,16 @@ package android.telephony {
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthNr> CREATOR;
|
||||
}
|
||||
|
||||
public final class CellSignalStrengthTdscdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public int getAsuLevel();
|
||||
method public int getDbm();
|
||||
method public int getLevel();
|
||||
method public int getRscp();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthTdscdma> CREATOR;
|
||||
}
|
||||
|
||||
public final class CellSignalStrengthWcdma extends android.telephony.CellSignalStrength implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public int getAsuLevel();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.telephony;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.os.Parcel;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
@@ -203,6 +204,12 @@ public final class CellIdentityTdscdma extends CellIdentity {
|
||||
.append("}").toString();
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface */
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface */
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
@@ -226,16 +233,17 @@ public final class CellIdentityTdscdma extends CellIdentity {
|
||||
|
||||
/** Implement the Parcelable interface */
|
||||
@SuppressWarnings("hiding")
|
||||
@NonNull
|
||||
public static final Creator<CellIdentityTdscdma> CREATOR =
|
||||
new Creator<CellIdentityTdscdma>() {
|
||||
@Override
|
||||
public CellIdentityTdscdma createFromParcel(Parcel in) {
|
||||
public @NonNull CellIdentityTdscdma createFromParcel(Parcel in) {
|
||||
in.readInt(); // skip
|
||||
return createFromParcelBody(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellIdentityTdscdma[] newArray(int size) {
|
||||
public @NonNull CellIdentityTdscdma[] newArray(int size) {
|
||||
return new CellIdentityTdscdma[size];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.telephony;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
@@ -24,7 +25,9 @@ import java.util.Objects;
|
||||
/**
|
||||
* A {@link CellInfo} representing a TD-SCDMA cell that provides identity and measurement info.
|
||||
*
|
||||
* @hide
|
||||
* @see android.telephony.CellInfo
|
||||
* @see android.telephony.CellSignalStrengthTdscdma
|
||||
* @see android.telephony.CellIdentityTdscdma
|
||||
*/
|
||||
public final class CellInfoTdscdma extends CellInfo implements Parcelable {
|
||||
|
||||
@@ -72,18 +75,21 @@ public final class CellInfoTdscdma extends CellInfo implements Parcelable {
|
||||
mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
|
||||
}
|
||||
|
||||
@Override public CellIdentityTdscdma getCellIdentity() {
|
||||
@Override
|
||||
public @NonNull CellIdentityTdscdma getCellIdentity() {
|
||||
return mCellIdentityTdscdma;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setCellIdentity(CellIdentityTdscdma cid) {
|
||||
mCellIdentityTdscdma = cid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellSignalStrengthTdscdma getCellSignalStrength() {
|
||||
public @NonNull CellSignalStrengthTdscdma getCellSignalStrength() {
|
||||
return mCellSignalStrengthTdscdma;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setCellSignalStrength(CellSignalStrengthTdscdma css) {
|
||||
mCellSignalStrengthTdscdma = css;
|
||||
@@ -149,15 +155,16 @@ public final class CellInfoTdscdma extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface */
|
||||
@NonNull
|
||||
public static final Creator<CellInfoTdscdma> CREATOR = new Creator<CellInfoTdscdma>() {
|
||||
@Override
|
||||
public CellInfoTdscdma createFromParcel(Parcel in) {
|
||||
public @NonNull CellInfoTdscdma createFromParcel(Parcel in) {
|
||||
in.readInt(); // Skip past token, we know what it is
|
||||
return createFromParcelBody(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellInfoTdscdma[] newArray(int size) {
|
||||
public @NonNull CellInfoTdscdma[] newArray(int size) {
|
||||
return new CellInfoTdscdma[size];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.telephony;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.PersistableBundle;
|
||||
@@ -25,7 +26,8 @@ import java.util.Objects;
|
||||
/**
|
||||
* Tdscdma signal strength related information.
|
||||
*
|
||||
* @hide
|
||||
* This class provides signal strength and signal quality information for the TD-SCDMA air
|
||||
* interface. For more information see 3gpp 25.225.
|
||||
*/
|
||||
public final class CellSignalStrengthTdscdma extends CellSignalStrength implements Parcelable {
|
||||
|
||||
@@ -59,7 +61,9 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
|
||||
* @param rssi in dBm [-113, -51] or UNAVAILABLE
|
||||
* @param ber [0-7], 99 or UNAVAILABLE
|
||||
* @param rscp in dBm [-120, -24] or UNAVAILABLE
|
||||
* @hide */
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public CellSignalStrengthTdscdma(int rssi, int ber, int rscp) {
|
||||
mRssi = inRangeOrUnavailable(rssi, -113, -51);
|
||||
mBitErrorRate = inRangeOrUnavailable(ber, 0, 7, 99);
|
||||
@@ -148,8 +152,7 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RSCP as dBm
|
||||
* @hide
|
||||
* Get the RSCP as dBm value -120..-24dBm or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
|
||||
*/
|
||||
public int getRscp() {
|
||||
return mRscp;
|
||||
@@ -160,7 +163,7 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
|
||||
*
|
||||
* Asu is calculated based on 3GPP RSRP. Refer to 3GPP 27.007 (Ver 10.3.0) Sec 8.69
|
||||
*
|
||||
* @return RSCP in ASU 0..96, 255, or UNAVAILABLE
|
||||
* @return RSCP in ASU 0..96, 255, or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
|
||||
*/
|
||||
@Override
|
||||
public int getAsuLevel() {
|
||||
@@ -237,15 +240,16 @@ public final class CellSignalStrengthTdscdma extends CellSignalStrength implemen
|
||||
|
||||
/** Implement the Parcelable interface */
|
||||
@SuppressWarnings("hiding")
|
||||
@NonNull
|
||||
public static final Parcelable.Creator<CellSignalStrengthTdscdma> CREATOR =
|
||||
new Parcelable.Creator<CellSignalStrengthTdscdma>() {
|
||||
@Override
|
||||
public CellSignalStrengthTdscdma createFromParcel(Parcel in) {
|
||||
public @NonNull CellSignalStrengthTdscdma createFromParcel(Parcel in) {
|
||||
return new CellSignalStrengthTdscdma(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellSignalStrengthTdscdma[] newArray(int size) {
|
||||
public @NonNull CellSignalStrengthTdscdma[] newArray(int size) {
|
||||
return new CellSignalStrengthTdscdma[size];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user