Follows the best practice in
go/android-api-guidelines#rethrow-remoteexception, Rethrow
RemoteException as RuntimeException when system server crash to
ensure that apps don’t accidentally persist security or policy decisions
Bug: 210990980
Test: atest TelephonyRegistryManagerTest
Change-Id: I1656a2385590910c97660a270cae60ca754c8e3a
DataEnabledSettings used an internal DataEnabledChangedReason when
notifying data enabled was changed. For DataSettingsManager, sync the
reasons with TelephonyManager#DataEnabledReasons and remove the internal
reaons.
Test: atest FrameworksTelephonyTests
Bug: 204309297
Change-Id: I8d6fd13e319ce165e25f2afd93bf9884fbf22667
DataProfile is the parameters used for setup data, but DataProfile
is almost identical as ApnSetting. So move ApnSetting into
DataProfile, also add TrafficDescriptor, which is specific to
5G SA network.
Also added a new state for data handover between IWLAN and cellular.
Bug: 196597630
Test: CTS && atest FrameworksTelephonyTests
Change-Id: I3f188921b92b4a14c323819ff58ab9ae57488937
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
Current APIs does not include subId or phoneId to locate which
carrier network reported the change. A patch based on carrier
privilege were deployed in Q to temprarily fix the issue.
However, multiple subscriptions which all have the carrier
privileges will all get notified, even only one of them
has the real change.
To throughly resolve the issue, the subscription is introduced
in the API to distinguish which network actually has the change.
Bug: 131697791
Test: atest TelephonyRegistryManagerTest CarrierServiceTest
Change-Id: Ie7ee25f53da605c15e1a9228482cc8c4e7406d2a
This callback will allow privileged components to listen to changes
around carrier privileged apps in a way that is aware and accounts for
SIM profile switches. This callback will be backed by
CarrierPrivilegesTracker as a follow-up change.
Bug: 205736323
Test: atest android.telephony.cts.TelephonyRegistryManagerTest
Change-Id: I432ed00be16c68303bf5c8e074fb9d6cf83e82c9
The feature is now replaced with TM#setSignalStrengthUpdateRequest
introduced in S release. The logic for the obsoleted feature is
cleared up.
The request to report system signal strength while idle is
still protected by permission to use internally.
Bug: 177924721
Test: atest TelephonyRegistryTest SignalStrengthUpdateRequestTest
Change-Id: Idad4ca59720fac50b5ec0fe50e2b6ac8e9dbb801
This change clears calling identities before the
onSubscriptionsChangedListener.onSubscriptionsChanged() callback is
made.
Bug: 193731920
Test: atest TelephonyRegistryManagerTest
Change-Id: I21f14e40a05f76346eb90b8f36608b4d6bdf1a29
- Hold ACCESS_FINE_LOCATION: full service state
- Hold ACCESS_COARSE_LOCATION: set cellIdentity is null
- No local permission: set cellIdentity, mOperatorAlphaLong, mOperatorAlphaShort
and mOperatorNumeric are null
Bug: 165014401
Test: make
Change-Id: I9ada08a530d9b8bc8483edfad783ff3b7434faa3
For API version 31+, ensure that READ_PHONE_STATE is checked on
APIs that retrieve/notify the call state of the device.
Bug: 157233955
Test: atest CtsTelecomTestCases2 CtsTelephony2TestCases
Change-Id: I9f8674a3075d3e0f75ee4f41eefce328c0fa6b91
Add the link capacity estimate system API.
Remove the system API of getCarrierBandwidth() and CarrierBandwidth as
they are replaced by the new LCE system API in PhoneStateListener.
Bug: 180434672
Bug: 176814680
Test: manual test of the new LCE system API in LinkBandwidthEstimator
Test: atest -c PhoneStateListenerTest
Merged-In: I5899acf02006a164e31f9b82aeaa7974dd6d2869
Change-Id: I5899acf02006a164e31f9b82aeaa7974dd6d2869
This reverts commit 8d60c5ceb4.
Reason for revert: <this CL doesn't break error prone build. Will redo the CTS one which does break the build>
Change-Id: I5899acf02006a164e31f9b82aeaa7974dd6d2869
Bug: 182869926
Revert "Add CTS test for onLinkCapacityEstimateChanged"
Revert "[Telephony] Notify onLinkCapacityEstimateChanged"
Revert "Remove the system API of getCarrierBandwidth()"
Revert submission 13662828-LceApi
Reason for revert: b/182869926, breaks errorprone
Reverted Changes:
I1998c7e49:Add CTS test for onLinkCapacityEstimateChanged
Id69fa8b7a:Integrate New LCE Api
I0cc020ba3:Remove the system API of getCarrierBandwidth()
Id613dc152:Add the LCE system API
If7cede0f4:[Telephony] Notify onLinkCapacityEstimateChanged
Change-Id: I30813c321509ac44fa0119b0ce905fd28b0f139c
Add the link capacity estimate system API.
Remove the system API of getCarrierBandwidth() and CarrierBandwidth as
they are replaced by the new LCE system API in PhoneStateListener.
Bug: 180434672
Bug: 176814680
Test: manual test of the new LCE system API in LinkBandwidthEstimator
Test: atest -c PhoneStateListenerTest
Change-Id: Id613dc152e524045a89295e5dd03171b22377e16
When the legacy PhoneStateListener was migrated to the new
TelephonyCallback class, the onCallStateChanged listener was copied over
as is. This CL removes the phone number parameter from the new listener.
Under the hood, both the old PhoneStateListener and the new one use the
same IPhoneStateListener.aidl file, so the onCallStateChanged method for
the legacy listener is changed to onLegacyCallStateListener.
Test: See CTS test CL; added a bunch of CTS tests for this.
Fixes: 165831812
Change-Id: Ia67968b5235954b606c6bd2890cc6f46c468e041
To avoid the IDE does not have the warn if developers implement callback:
1. Revert PhoneStateListener to Android 11 version.
2. New TelephonyCallback
3. Deprecate the old PhoneStateListener.onXx() callbacks
Bug: 167684594
Test: make and PhoneStateListenerTest and TelephonyCallbackTest
Change-Id: I0fdd7fc3c3d67310197862c84d02f30164ec80d1
Merged-In: I0fdd7fc3c3d67310197862c84d02f30164ec80d1
To avoid the IDE does not have the warn if developers implement callback:
1. Revert PhoneStateListener to Android 11 version.
2. New TelephonyCallback
3. Deprecate the old PhoneStateListener.onXx() callbacks
Bug: 167684594
Test: make and PhoneStateListenerTest and TelephonyCallbackTest
Change-Id: I0fdd7fc3c3d67310197862c84d02f30164ec80d1
Also use the Executor passed in through TM#registerPhoneStateListener
instead of the one created in PSL from Looper.myLooper().
Test: atest -c TelephonyManagerTest
Bug: 175263146
Change-Id: I158dbc88532470e86a89822b63421e5cadfea26f
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.
Also add more detailed examples to OWNERS.md.
Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b