Merge "Add API to Retrieve Detailed SignalStrength Info" am: b6d32aa5e8
am: 1ee0a3de13
Change-Id: I9abe7802a5e04714275efc901bcff295625c5b1f
This commit is contained in:
@@ -42730,6 +42730,7 @@ package android.telephony {
|
||||
method public int describeContents();
|
||||
method public int getCdmaDbm();
|
||||
method public int getCdmaEcio();
|
||||
method public java.util.List<android.telephony.CellSignalStrength> getCellSignalStrengths();
|
||||
method public int getEvdoDbm();
|
||||
method public int getEvdoEcio();
|
||||
method public int getEvdoSnr();
|
||||
|
||||
@@ -24,6 +24,8 @@ import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.PersistableBundle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -178,6 +180,35 @@ public class SignalStrength implements Parcelable {
|
||||
return mLte;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a List of CellSignalStrength Components of this SignalStrength Report.
|
||||
*
|
||||
* Use this API to access underlying
|
||||
* {@link android.telephony#CellSignalStrength CellSignalStrength} objects that provide more
|
||||
* granular information about the SignalStrength report. Only valid (non-empty)
|
||||
* CellSignalStrengths will be returned. The order of any returned elements is not guaranteed,
|
||||
* and the list may contain more than one instance of a CellSignalStrength type.
|
||||
*
|
||||
* @return a List of CellSignalStrength or an empty List if there are no valid measurements.
|
||||
*
|
||||
* @see android.telephony#CellSignalStrength
|
||||
* @see android.telephony#CellSignalStrengthNr
|
||||
* @see android.telephony#CellSignalStrengthLte
|
||||
* @see android.telephony#CellSignalStrengthTdscdma
|
||||
* @see android.telephony#CellSignalStrengthWcdma
|
||||
* @see android.telephony#CellSignalStrengthCdma
|
||||
* @see android.telephony#CellSignalStrengthGsm
|
||||
*/
|
||||
public @NonNull List<CellSignalStrength> getCellSignalStrengths() {
|
||||
List<CellSignalStrength> cssList = new ArrayList<>(2); // Usually have 2 or fewer elems
|
||||
if (mLte.isValid()) cssList.add(mLte);
|
||||
if (mCdma.isValid()) cssList.add(mCdma);
|
||||
if (mTdscdma.isValid()) cssList.add(mTdscdma);
|
||||
if (mWcdma.isValid()) cssList.add(mWcdma);
|
||||
if (mGsm.isValid()) cssList.add(mGsm);
|
||||
return cssList;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void updateLevel(PersistableBundle cc, ServiceState ss) {
|
||||
mLteRsrpBoost = ss.getLteEarfcnRsrpBoost();
|
||||
|
||||
Reference in New Issue
Block a user