Adding @throws tags for EmergencyNumber APIs so that callers are aware
that they can throw.
Test: Build; docs only change.
Bug: 134100020
Fixes: 152231444
Merged-In: Ic6bcd32ab93a97a8d075e720acb5fc17612a3984
Change-Id: Ic6bcd32ab93a97a8d075e720acb5fc17612a3984
(cherry picked from commit 5fe27428f0)
Prior to finalization, we need to remove all methods which were
replaced but kept around for short-term compatibility purposes.
PreciseDataConnectionState had a couple methods that fell into this
category that had yet to be removed.
Bug: 152787887
Test: builds
Change-Id: Ib175b2530791cec7e31684a1d3f318c95e27f707
According to the crash stack, the Telephony crash in the method ImsCallProfile#toString. Add the null check before assessing the class instance.
Bug: 148746493
Test: manual
Change-Id: I156c8ac9f8cd05e678cc38397e84e10f14ce7403
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners
Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
Fully rolled back comments and signature to original state before change
Test: bootup phone
Bug: 147854704
Change-Id: I5fcd71e1569e6b0e16cff5392239b89259ee1790
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
Change-Id: I08dc0d2050a9f4d4b574178e1c68a23d015768e4
aosp/891956 introduced signal strengths support for NR. In the
method SignalStrength.getPrimary, NR is the lowest priority.
This is against the policy which is in the comment, saying
"prioritizing newer faster RATs".
Bug: 148634820
Test: atest com.android.internal.telephony.SignalStrengthTest
Change-Id: Ia9055c9e8cd8d09cdd3f101750c9f9cea983a9f8
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
SubscriptionManager#addOnSubscriptionsChangedListener can fail to
register a listener if the TELEPHONY_REGISTRY system service is not up.
Currently this is just silently ignored.
Adding a callback method on the listener to notify the registrant that the
listener failed to be registered, and adding exponential backoff code in
TelecomAccountRegistry to retry registration.
Test: Manual; edited code in Subscriptionmanager to fail the first attempts
to add a listener for TelecomAccountRegistry. Verified the backoff took
place and registration still occurred for the listener.
Test: Tried to write a mockito test but gave up because this code has
far too many intertwined dependencies and is not inherently testable
Fixes: 152217039
Change-Id: Icf3133cdeca526979cb621f29659b880127b680a
UiccAccessRule includes functionality for getting Signatures from a
PackageInfo and hashing a cert. Instead of duplicating this code in
CarrierPrivilegesTracker, make it visible with @hide.
Bug: 147391402
Test: atest FrameworksTelephonyTests
Change-Id: I4f95ab512e94cd851a6928d8eb7918d5a04bfa60
DcTracker uses several SIM related signals for different purposes.
Those signals include SIM record loaded/not-loaded, subscription
changed event, and carrier config changed event. Those signals
are slightly different but not that really important to DcTracker.
What DcTracker cares is
1. Whether SIM is inserted or not.
2. Whether configuration changes or not.
By listening to a single carrier config change event can handle
the cases above.
Removed all SIM record related places in DcTracker. SIM record should
not be accessed by anyone outside of UICC controller.
Test: Manual test + unit tests
Bug: 146168348
Change-Id: Iad45933ea77eb460625a891071535cbeaf8ac3b0
getLine1Number has been moved out of the READ_PHONE_STATE permission,
but callers with READ_PHONE_STATE can still query SubscriptionInfo
which contains the number for the subscription. The number will be
sanitized from the resulting SubscriptionInfo object(s); this change
updates the docs to reflect the new READ_PHONE_NUMBERS permission
requirement.
Bug: 152063877
Test: atest SubscriptionControllerTest
Change-Id: If4834ad0f648556207ad9b848fc4db332993a6d6
This was recently removed as part of un-exposing telephony
mainline related APIs (b/146983487), but being added back in R as GMSCore
already uses it (b/151742706).
Test: TH
Bug: 151742706
Bug: 146983487
Change-Id: If4e8e87c7dfbb261ee3abfec2a4774980c24d0c2
In Androird 10 access to device identifiers was limited to apps with
the READ_PRIVILEGED_PHONE_STATE permission, carrier privileges, the
READ_DEVICE_IDENTIFIERS appop set to allow, or those that pass a
device / profile owner check. TelephonyManager#getSimSerialNumber
was guarded behind these new access requirements, but the same value
is still accessible as the cardString from the SubscriptionInfo.
While getCardString is a hidden API SubscriptionInfo#toString can
be used to obtain this value.
Bug: 152057778
Test: atest SubscriptionControllerTest
Change-Id: I9b8786a321b1ba79d81b74c3041589f30df8e9c8