diff options
| author | 2023-09-19 17:12:54 +0000 | |
|---|---|---|
| committer | 2023-09-19 17:12:54 +0000 | |
| commit | bb3c08896bf1de01271bea6fb17a65e5a1b088dc (patch) | |
| tree | 002ab105c198cdea9b15ff4d89dba9bb42f0a3d6 | |
| parent | 1ce46e803b9ef0321a727c98d3ae795310d50daf (diff) | |
| parent | 3a6932eec9f0790285b2aa12f8c89a06214b380f (diff) | |
Merge "Fixed javadoc error" into main
| -rw-r--r-- | telephony/java/android/telephony/SignalStrength.java | 146 |
1 files changed, 50 insertions, 96 deletions
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java index f1af68f5cfee..53f347e3b192 100644 --- a/telephony/java/android/telephony/SignalStrength.java +++ b/telephony/java/android/telephony/SignalStrength.java @@ -71,13 +71,6 @@ public class SignalStrength implements Parcelable { */ public static final int INVALID = Integer.MAX_VALUE; - private static final int LTE_RSRP_THRESHOLDS_NUM = 4; - - private static final int WCDMA_RSCP_THRESHOLDS_NUM = 4; - - /* The type of signal measurement */ - private static final String MEASUREMENT_TYPE_RSCP = "rscp"; - // Timestamp of SignalStrength since boot // Effectively final. Timestamp is set during construction of SignalStrength private long mTimestampMillis; @@ -92,28 +85,9 @@ public class SignalStrength implements Parcelable { CellSignalStrengthNr mNr; /** - * Create a new SignalStrength from a intent notifier Bundle - * - * This method may be used by external applications. - * - * @param m Bundle from intent notifier - * @return newly created SignalStrength - * - * @hide - */ - @UnsupportedAppUsage - public static SignalStrength newFromBundle(Bundle m) { - SignalStrength ret; - ret = new SignalStrength(); - ret.setFromNotifierBundle(m); - return ret; - } - - /** * This constructor is used to create SignalStrength with default * values. * - * @return newly created SignalStrength * @hide */ @UnsupportedAppUsage @@ -164,20 +138,20 @@ public class SignalStrength implements Parcelable { * 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 + * {@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 + * @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 */ @NonNull public List<CellSignalStrength> getCellSignalStrengths() { return getCellSignalStrengths(CellSignalStrength.class); @@ -187,7 +161,7 @@ public class SignalStrength implements Parcelable { * 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 + * {@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. @@ -197,13 +171,13 @@ public class SignalStrength implements Parcelable { * return values. * @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 + * @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 */ @NonNull public <T extends CellSignalStrength> List<T> getCellSignalStrengths( @NonNull Class<T> clazz) { @@ -319,7 +293,7 @@ public class SignalStrength implements Parcelable { * */ public static final @android.annotation.NonNull Parcelable.Creator<SignalStrength> CREATOR = - new Parcelable.Creator<SignalStrength>() { + new Parcelable.Creator<>() { public SignalStrength createFromParcel(Parcel in) { return new SignalStrength(in); } @@ -327,7 +301,7 @@ public class SignalStrength implements Parcelable { public SignalStrength[] newArray(int size) { return new SignalStrength[size]; } - }; + }; /** * Get the GSM RSSI in ASU. @@ -338,7 +312,7 @@ public class SignalStrength implements Parcelable { * * @deprecated this information should be retrieved from * {@link CellSignalStrengthGsm#getAsuLevel}. - * @see android.telephony#CellSignalStrengthGsm + * @see android.telephony.CellSignalStrengthGsm * @see android.telephony.SignalStrength#getCellSignalStrengths */ @Deprecated @@ -352,7 +326,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthGsm#getBitErrorRate}. * - * @see android.telephony#CellSignalStrengthGsm + * @see android.telephony.CellSignalStrengthGsm * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -368,7 +342,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getCdmaDbm}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -382,7 +356,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getCdmaEcio}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -398,7 +372,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getEvdoDbm}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -412,7 +386,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getEvdoEcio}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -426,7 +400,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getEvdoSnr}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() */ @Deprecated @@ -438,7 +412,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getRssi}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -452,7 +426,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getRsrp}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -466,7 +440,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getRsrq}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -480,7 +454,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getRssnr}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -494,7 +468,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getCqi}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -527,7 +501,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrength#getAsuLevel}. Because the levels vary by technology, * this method is misleading and should not be used. - * @see android.telephony#CellSignalStrength + * @see android.telephony.CellSignalStrength * @see android.telephony.SignalStrength#getCellSignalStrengths * @hide */ @@ -543,7 +517,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrength#getDbm()}. Because the levels vary by technology, * this method is misleading and should not be used. - * @see android.telephony#CellSignalStrength + * @see android.telephony.CellSignalStrength * @see android.telephony.SignalStrength#getCellSignalStrengths * @hide */ @@ -559,7 +533,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthGsm#getDbm}. * - * @see android.telephony#CellSignalStrengthGsm + * @see android.telephony.CellSignalStrengthGsm * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -575,7 +549,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthGsm#getLevel}. * - * @see android.telephony#CellSignalStrengthGsm + * @see android.telephony.CellSignalStrengthGsm * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -591,7 +565,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthGsm#getAsuLevel}. * - * @see android.telephony#CellSignalStrengthGsm + * @see android.telephony.CellSignalStrengthGsm * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -607,7 +581,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getLevel}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -625,7 +599,7 @@ public class SignalStrength implements Parcelable { * ASU for CDMA, the resultant value is Android-specific and is not recommended * for use. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -641,7 +615,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthCdma#getEvdoLevel}. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -659,7 +633,7 @@ public class SignalStrength implements Parcelable { * ASU for EvDO, the resultant value is Android-specific and is not recommended * for use. * - * @see android.telephony#CellSignalStrengthCdma + * @see android.telephony.CellSignalStrengthCdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -675,7 +649,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getDbm}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -691,7 +665,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getLevel}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -708,7 +682,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthLte#getAsuLevel}. * - * @see android.telephony#CellSignalStrengthLte + * @see android.telephony.CellSignalStrengthLte * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -739,7 +713,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthTdscdma#getDbm}. * - * @see android.telephony#CellSignalStrengthTdscdma + * @see android.telephony.CellSignalStrengthTdscdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -758,7 +732,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthTdscdma#getLevel}. * - * @see android.telephony#CellSignalStrengthTdscdma + * @see android.telephony.CellSignalStrengthTdscdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -774,7 +748,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthTdscdma#getAsuLevel}. * - * @see android.telephony#CellSignalStrengthTdscdma + * @see android.telephony.CellSignalStrengthTdscdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -790,7 +764,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthWcdma#getRscp}. * - * @see android.telephony#CellSignalStrengthWcdma + * @see android.telephony.CellSignalStrengthWcdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -805,7 +779,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthWcdma#getAsuLevel}. * - * @see android.telephony#CellSignalStrengthWcdma + * @see android.telephony.CellSignalStrengthWcdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -828,7 +802,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthWcdma#getDbm}. * - * @see android.telephony#CellSignalStrengthWcdma + * @see android.telephony.CellSignalStrengthWcdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -843,7 +817,7 @@ public class SignalStrength implements Parcelable { * @deprecated this information should be retrieved from * {@link CellSignalStrengthWcdma#getDbm}. * - * @see android.telephony#CellSignalStrengthWcdma + * @see android.telephony.CellSignalStrengthWcdma * @see android.telephony.SignalStrength#getCellSignalStrengths() * @hide */ @@ -895,32 +869,12 @@ public class SignalStrength implements Parcelable { } /** - * Set SignalStrength based on intent notifier map - * - * @param m intent notifier map - * - * @deprecated this method relies on non-stable implementation details, and full access to - * internal storage is available via {@link getCellSignalStrengths()}. - * @hide - */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) - private void setFromNotifierBundle(Bundle m) { - mCdma = m.getParcelable("Cdma", android.telephony.CellSignalStrengthCdma.class); - mGsm = m.getParcelable("Gsm", android.telephony.CellSignalStrengthGsm.class); - mWcdma = m.getParcelable("Wcdma", android.telephony.CellSignalStrengthWcdma.class); - mTdscdma = m.getParcelable("Tdscdma", android.telephony.CellSignalStrengthTdscdma.class); - mLte = m.getParcelable("Lte", android.telephony.CellSignalStrengthLte.class); - mNr = m.getParcelable("Nr", android.telephony.CellSignalStrengthNr.class); - } - - /** * Set intent notifier Bundle based on SignalStrength * * @param m intent notifier Bundle * * @deprecated this method relies on non-stable implementation details, and full access to - * internal storage is available via {@link getCellSignalStrengths()}. + * internal storage is available via {@link #getCellSignalStrengths()}. * @hide */ @Deprecated |