summaryrefslogtreecommitdiff
path: root/telephony/java/android/telephony/CellIdentityWcdma.java
AgeCommit message (Collapse)Author
2020-04-30Update GlobalCellId during Un-parcelingNathan Harold
The Global Cell-ID is constructed from other fields in each CellIdentity. Currently, it is not stored during parceling. Thus, after a CellId is parceled and unparceled this value is being lost. Do a quick fix to update the global Cell ID during unparceling. A longer-term fix is to resolve the layering violations that create the situation where the global Cell ID is defined in the base class but manipulated in the derived classes. Fixes a broken unit test. Bug: 154955167 Test: atest ServiceStateTrackerTest#testRatRatchet Merged-In: I5c58322ebcec8886405e25e09754c7f154187efe Change-Id: I5c58322ebcec8886405e25e09754c7f154187efe (cherry picked from commit 3f7dfb823912ec0406260c0da5a8ace13e6f7287)
2020-04-03Check HIDL Discriminator for CSG InfoNathan Harold
ART throws an exception if an unpopulated safe union element is accessed at runtime, so instead we have to check the hidl_discriminator to see whether the element is populated before trying to access it (and thus we skip the null check). Bug: 152486447 Test: atest testCellIdentityLte_1_5_CsgInfo \ testCellIdentityWcdma_1_5_CsgInfo \ testCellIdentityTdscdma_1_5_CsgInfo Merged-In: I08dc0d2050a9f4d4b574178e1c68a23d015768e4 Change-Id: I08dc0d2050a9f4d4b574178e1c68a23d015768e4 (cherry picked from commit f85a2e9220cb523dcb8c05d04a7bcb8b2cfcaf6d)
2020-03-30Add global cell ID to all technologiesMingming Cai
Add global cell ID to CellIdentity and all technologies, including GSM, CDMA, WCDMA, TDSCDMA, LTE, and NR. Bug: 80159277 Test: CellIdentityTest, CellIdentityGsmTest, CellIdentityCDMATest, CellIdentityWcdmaTest, CellIdentityTdscdmaTest, CellIdentityLteTest, CellIdentityNrTest, CellIdentityNrTes, ServiceStateTrackerTest Change-Id: I2174e8d8c286da200562ef77cff78c3fca26cee2 Merged-In: I2174e8d8c286da200562ef77cff78c3fca26cee2 (cherry picked from commit c78abaad354cc780d48f5774eb427ade58a2c411)
2020-03-18Convert getAdditionalPlmns to return a SetNathan Harold
Set support is a little weird in Java and Android. Java doesn't support ArraySet, but Android does; Parcel has both read/write for ArraySet, but they are @hide. Thus, my options were limited to: -use the hidden parcel methods -convert between list and set in the constructor and parcel code -convert between list and set in the getter -maintain parallel data structures. Using the hidden methods seemed cleanest. Since they are @UnsupportedAppUsage they can't be credibly removed. In addition, the HAL code doesn't understand Set<> only List<> so I was faced with the choice of having 2 constructors or using Collection<>, which actually works just fine and avoids changing a hundred or so unit tests with no ill effect. Bug: 149476549 Test: atest FrameworksTelephonyTests Test: (cts) atest CellInfoTest Merged-In: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd Change-Id: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd (cherry picked from commit 5522de1af3bd875cfb4aa584e275ff148e95eb1f)
2020-01-31Add Nullability Annotations and verification to CellIdentityRambo Wang
Bug: 148177166 Test: atest FrameworksTelephonyTests Change-Id: Ie98db2ce393a76644a4773045eafc28ce6f4a4cb Merged-In: Ie98db2ce393a76644a4773045eafc28ce6f4a4cb (cherry picked from commit 33f62a071c2e128379ce2b2c41bdadfeca1740ed)
2020-01-27Multi-Plmn and CSG Support For CellInfoNathan Harold
Add CellIdentity support for HAL 1.5 -Add new constructors for HAL 1.5 -Add APIs to get additional PLMNs advertised by the cell beyond the first, for MOCN networks. -Add support for CSG info in WCDMA, TD-SCDMA, and LTE Bug: 135921133 Test: wip Change-Id: Iffd9351d2170a496639eced2c4618819f522494c Merged-In: Iffd9351d2170a496639eced2c4618819f522494c
2020-01-13Merge "Add Callback for Registration Failure"Treehugger Robot
2020-01-13Merge "Use new UnsupportedAppUsage annotation."Treehugger Robot
2020-01-12Add Callback for Registration FailureNathan Harold
Add a callback to PhoneStateListener to indicate that a registration procedure has failed. Bug: 143187047 Test: make update-api && make Merged-In: I4a4ba4479dfd465a9d8063135f3b4bf4e1323e99 Change-Id: I4a4ba4479dfd465a9d8063135f3b4bf4e1323e99 (cherry picked from commit 5e6e983cadb9c69fac91e0210308b4b62c1def7b)
2020-01-09Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23 Merged-In: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
2020-01-08Use Parcelable CellIdentity instead of CellLocation in AIDL.Meng Wang
Currently CellLocation is passed over AIDL by manually marshalling/unmarshalling to/from Bundle, and type info is not preserved in the process. Bug: 146092124 Test: make Merged-In: I6225f100953a2ad354acaa261a774989926393ce Change-Id: I6225f100953a2ad354acaa261a774989926393ce
2019-04-11Merge "Improve Range Checks on CellIdentity Classes" am: 7b2d8029caNathan Harold
am: 684cc9528c Change-Id: I6e21b1042db7a601190d7e7a0286c49280f79e63
2019-04-11Improve Range Checks on CellIdentity ClassesNathan Harold
Add range checks to ensure that parameters passed to CellIdentity are within range; if not then set them to the UNAVAILABLE value. Bug: 122834811 Test: atest FrameworksTelephonyTests Change-Id: I0d3699823be60722a1b741efd60b56f23bbc3e86
2019-04-09Update Javadocs for CellInfo ClassesNathan Harold
-Add nullability annotations for getMccString and getMncString. -Add IntRange to CellSignalStrength#getLevel() -Fix a few docstring errors. Bug: 129902021 Test: make && make update-api && make offline-sdk-docs (no functional change) Merged-In: I61d645f79a23226ab902fc657fe7b07ffd674a0b Change-Id: I61d645f79a23226ab902fc657fe7b07ffd674a0b
2019-04-09Update Javadocs for CellInfo ClassesNathan Harold
-Add nullability annotations for getMccString and getMncString. -Add IntRange to CellSignalStrength#getLevel() -Fix a few docstring errors. Bug: 129902021 Test: make && make update-api && make offline-sdk-docs (no functional change) Change-Id: I61d645f79a23226ab902fc657fe7b07ffd674a0b (cherry picked from commit b858d8c682261aae4ab5b99e5c0c99b627b329cb)
2019-04-01Allow requestNetworkScan to return sanitized info am: c9d7430685 am: 87217889f1Hall Liu
am: 9e1d425b58 Change-Id: I3fab8c08100a68aba55eefb27b587e73849bc108
2019-03-26Allow requestNetworkScan to return sanitized infoHall Liu
If an app doesn't have location permissions or if the system location switch is off, allow requestNetworkScan to still function, but sanitize the returned CellInfo objects first and disallow certain input arguments Bug: 126779616 Test: CTS Change-Id: Ic9c44043bd30d402f128bf0723f2b0bf6c420e3e
2019-02-28All Parcelable CREATOR fields are @NonNull.Jeff Sharkey
If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
2018-12-26Refactor CellInfo ConstructorsNathan Harold
Bug: 119224773 Test: atest FrameworksTelephonyTests Change-Id: Ibf56797b5be2508656409a3437ff79210334bfd6
2018-12-18Annotate getMobileNetworkOperator() as NullableNathan Harold
Add Nullable annotations for the classes that support getMobileNetworkOperator(). Bug: 118675404 Test: compilation (no functional change) Change-Id: I914ec8242aff2f578dfe1f97f2e7cfe2d109c7dc
2018-10-25Define CellInfo.UNAVAILABLE for Unreported FieldsNathan Harold
For all CellInfo classes, there is a common value for fields that are unreported by the modem: Integer.MAX_VALUE. To better document this value, this CL defines it as a constant "UNAVAILABLE" to indicate that for whatever reason the framework is not reporting this value to the caller. Bug: 28171234 Test: make; make offline-sdk-docs Change-Id: I0aa692e3f1b5478284d262ef97fd65b90bce8293
2018-08-23Merge "Add Conversion from CellIdentity to CellLocation"Nathan Harold
2018-08-23Add @UnsupportedAppUsage annotationsMathew Inwood
For packages: android.telephony android.telephony.cdma android.telephony.data android.telephony.euicc android.telephony.gsm android.telephony.ims android.telephony.ims.aidl android.telephony.ims.compat android.telephony.ims.compat.feature android.telephony.ims.compat.stub android.telephony.ims.feature android.telephony.ims.stub android.telephony.mbms android.telephony.mbms.vendor This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I02d900d6d0ec9a6b2172a71911fec61d04e4d235 Merged-In: I22547ac0ed384d74d61cfd51d20c140e392a597f
2018-08-21Add Conversion from CellIdentity to CellLocationNathan Harold
Add OO conversion from CellIdentity to CellLocation in the respective CellIdentity classes. Bug: 67711865 Test: manual Change-Id: I4e2dab7de5e5c5fa3bb42a22b14934874560c9fc
2018-08-09Merge CellInfo TYPE EnumsNathan Harold
CellIdentity and CellInfo had redundant enums to designate the structure type. This CL merges the better-formatted enums from CellIdentity to CellInfo, removing the set from CellIdentity. For cases where the structure type must be determined at runtime based on a CellInfo record, (where polymorphic behavior isn't/shouldn't be supported), this provides a consistent mechanism for determining the type without using RTTI. In addition, this CL fixes two other minor issues: 1) The constructor for CellInfoWcdma() provided the wrong parcel type to the parent class. 2) The TYPE_TDSCDMA had a typo in CellInfo and was written as TYPE_TDCDMA. Bug: 112003199 Bug: 67711865 Test: runtest frameworks-telephony Change-Id: I5ca3c2de1433dfcef264e1273a658d1a0fe864b6
2018-07-11Merge "Update Wcdma and Tdscdma CellInfo for HAL 1.2"Nathan Harold
am: c1e5c3ea82 Change-Id: I4bbedcc3f47706d677a1c66273bf1643c8f21be5
2018-07-10Update Wcdma and Tdscdma CellInfo for HAL 1.2Nathan Harold
In HAL 1.2 WCDMA and TDSCMA were updated to bring them in line with the other CellInfo types. WCDMA was missing support for Rscp and Ec/No; the former being the primary measurement used for WCDMA signal strength. TDSCDMA was missing support for RSSI, and the definition for RSCP was incorrect, so it was fixed to use the PCCPH RSCP. Furthermore, TDSCDMA support was unavailable except in the CellIdentity. This patch pipes support from the HAL to the framework, adding CellInfoTdscdma, which is primarily for Asia. -Add RSCP and Ec/No fields to CellSignalStrengthWcdma -Add CellInfoTdscdma and CellSignalStrengthTdscdma -Add UARFCN and Alphas support for CellIdentityTdscdma -Fix a bug in the equals() check for CellIdentity -Update documentation for CellInfo<RAT> classes and the getLevel() methods of CellSignalStrength<RAT> Bug: 76153768 Test: RILTests added for TDSCDMA Merged-In: I71e0998f1a9bd7656d495003a8ee5ef616ca4f43 Change-Id: I71e0998f1a9bd7656d495003a8ee5ef616ca4f43 (cherry picked from commit 88f44024bb068829358d66107360223dc73131f7)
2018-03-28Move alpha long/short to the base CellIdentity according API Review.Cassie
Bug: 74831568 Test: Telephony sanity Change-Id: I0ef69e3f18fca111191e1c6329ae13c0860869ba Merged-In: I0ef69e3f18fca111191e1c6329ae13c0860869ba
2018-03-23Move alpha long/short to the base CellIdentity according API Review.Cassie
Bug: 74831568 Test: Telephony sanity Change-Id: I0ef69e3f18fca111191e1c6329ae13c0860869ba
2018-03-21Merge "Cherry-pick 'Add @Nullable annotations to getOperatorAlphaLong and ↵Treehugger Robot
getOperatorAlphaShort to CellIdentity.'"
2018-03-20Cherry-pick 'Add @Nullable annotations to getOperatorAlphaLong andCassie
getOperatorAlphaShort to CellIdentity.' Bug: 75984192 Test: Unit test Change-Id: I71feb20075559c7b28d4aa346a603f0d11ca69da Merged-In: I71feb20075559c7b28d4aa346a603f0d11ca69da
2018-03-20Merge "Add @Nullable annotations to getOperatorAlphaLong and ↵Xi Han
getOperatorAlphaShort to CellIdentity." into pi-dev
2018-03-20Add @Nullable annotations to getOperatorAlphaLong andCassie
getOperatorAlphaShort to CellIdentity. Bug: 75984192 Test: Unit test Change-Id: I71feb20075559c7b28d4aa346a603f0d11ca69da
2018-03-09Add Duplex mode to ServiceState.Eric Schwarzenbach
Adds getChannelNumber() to CellIdentity. Creates a static utility class to calculate the duplex mode from an EARFCN. Bug: 73728783 Test: runtest frameworks-telephony Change-Id: I5b5c4efa7e17594ce9397cf65e129147affe96bd Merged-In: I5b5c4efa7e17594ce9397cf65e129147affe96bd (cherry picked from commit a483ce3bfd2df3b0c88382d59e67bb2bfcd361d8)
2018-03-08Add Duplex mode to ServiceState.Eric Schwarzenbach
Adds getChannelNumber() to CellIdentity. Creates a static utility class to calculate the duplex mode from an EARFCN. Bug: 73728783 Test: runtest frameworks-telephony Change-Id: I5b5c4efa7e17594ce9397cf65e129147affe96bd
2018-02-28Expand use of 'Str' suffix in CellIdentity to 'String'Cassie
Expand use of 'Str' suffix in CellIdentity to 'String' to match general usage across Android according to the API Review. Bug: 73751308 Test: Unit test Change-Id: Ib25a06056832be610ff1fb9c025467259eb543ed
2018-01-10Added Cell identity for TD-SCDMA and a base class CellIdentityJack Yu
Added CellIdentityTdscdma for TDS-CDMA cell identity. Also added a base class for existing CellIdentityXxx so that the network service can return specific RAT cell identity through the network service callback API which takes generic cell identity as the parameter. This is the preliminary change for IWLAN refactoring since cell identity is part of the CS/PS network registration. bug: 64132030 Test: Unit tests Change-Id: I3ca405d687667b6c43e782339edec26a6f6edfc9
2017-11-30Quick fix the getMobileNetworkOperator() in CellIdentity.Cassie
Bug: 69915536 Test: Basic telephony sanity Change-Id: Iac8222055aea95fbb5334876124ce9d1571ae2f6
2017-11-17Update the comments for all CellIdentity*.Cassie
Bug: 63984327 Test: Basic telephony sanity Change-Id: Icb9ba99cefb93a7c4a39cbc653ae046df8649cf9
2017-11-15Allow unknown mcc/mnc when constructing a CellIdentity from Parcel.Cassie
Bug: 63984327 Test: Basic telephony sanity Change-Id: Ia7670b7cd49db244e7c8309419ea8d7b1280a7fa
2017-11-15Revert "Allow unknown mcc/mnc when constructing a CellIdentity from Parcel."Cassie Han
Bug: 69349963 Bug: 69096589 Bug: 63984327 This reverts commit 993203c7e0d397f193b80c01774b4be925242dae. Change-Id: I52839aa5991541399651904587aa342a858a5915
2017-11-13Allow unknown mcc/mnc when constructing a CellIdentity from Parcel.Cassie
Bug: 69096589 Bug: 63984327 Test: Basic telephony sanity Change-Id: I0fe5b3a17b1a68c918f912ee98a00cfec4c5657b
2017-10-25Add the operator name and MCC/MNC in string format into the CellIdentity.Cassie
Bug: 63984327 Test: Basic telephony sanity Change-Id: Ia5e7f5b980efbde647f95f3e83a62d56132b90da
2016-01-26Cellinfo: Update to version 12Sanket Padawe
Add support for: GSM: arfcn, bsic, ta WCDMA: uarfcn LTE: earfcn Updated public APIs for getting above fields. Bug: 23528586 Change-Id: I97e18856bb41c5592f89641eac7d4a3dbef43d5d
2016-01-26Revert "Cellinfo: Update to version 12"Narayan Kamath
This reverts commit aa2be45a560b37c5249600667ee36a9f156515c2. Change-Id: I5cc76b15b311e47bc5a892704930d218c9f72b0d
2016-01-25Cellinfo: Update to version 12Sanket Padawe
Add support for: GSM: arfcn, bsic, ta WCDMA: uarfcn LTE: earfcn Updated public APIs for getting above fields. Bug: 23528586 Change-Id: I538a9f392550716d8a9a90e01fc88bc082ef7b81
2014-09-10Improve equals and hashCode in CellIdentityXxx methodsBrian Williammee
The equals methods were a lot of dead code that boiled down to seeing if two references pointed to the same object. The hashCode methods were likely to result in collisions on unequal objects. Bug: 10328291 Change-Id: I4bd93efd1f4a34e9dec55ac05868df37368abd6a
2013-04-17Add CellInfoWcdma and related classes.Wink Saville
Update javadoc's to define invalid values are Integer.MAX_VALUE. Bug: 8622081 Change-Id: I513a67d4b46b72f03e0c3360abcc0ad5222c1c13