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
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
1. Add int EVENT_* and expose these as @SystemApi
2. Add listener interface
3. Deprecated LISTEN_*
Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: Icfb2f892a18c4fd101473aed5c87c9d7a4bd3f18
[Telephony] PhoneStateListener redesign - use Set<Integer> instead of long
- Remove old listen api
- Use listenWithEventList for new design
Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I2184454c3fd127989edee6c09b175185de960f06
[Telephony] PhoneStateListener redesign - registerPhoneStateListener
- should register PhoneStateListener for event
- get event from event listener
- Add event to list
Bug: 167684594
Test: manual and atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I7ef23287879111277610b27aeeab5c8218ab3361
[Telephony] PhoneStateListener redesign - check permission
Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I40cc4c234ae6c70405193806ff3159fde0b4486d
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
Update the callback for emergency SMS to follow the same pattern as for
emergency calls for API consistency.
Fixes: 168269065
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: If27771aef1858ea92dd620b56368d1a6a4f61ab3
Merged-In: If27771aef1858ea92dd620b56368d1a6a4f61ab3
Clarify structure of the argument for the onEmergencyNumberListChanged
callback based on API council feedback.
Bug: 166230518
Test: NA
Change-Id: I9819337da12a17dc4736ba97b00018a156274680
For backwards compatibility, instead of calling both the old and new
versions of onOutgoingEmergencyCall, only call the new version, and call
the old version from the default impl of the new version instead.
Change suggested by API council.
Bug: 166230518
Test: atest CtsTelecomTestCases:OutgoingCallTest
Change-Id: Ifa9276cc615d0e33d37ebc702dbc0cd155e0d489
Expose the onEmergencyNumberListChanged method, which seems to have been
left hidden inadvertently when introduced.
Add a new version of onOutgoingEmergencyCall that supplies a
subscription ID and deprecate the old one. Along with this, send
emergency call events from any subscription to all listeners regardless
of which subscription the listener specified.
Test: atest CtsTelecomTestCases:OutgoingCallTest
Bug: 162647577
bug: 165660452
Change-Id: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
Merged-In: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
when users disable areaInfo toggle from CBR, clear areaInfos and
notify listeners that area info updated so that settings and systemUI
could refresh the UI instead of showing outdated area info.
Bug: 162475765
Test: Manual
Change-Id: I8c2b29750817a71165adff3ee64c96249e9d7380
Instead of triggering the data connection state changed
event from outside, now the event is triggering from
DataConnection. Whenever detecting data connection
state changes, the event will be triggered. This significantly
reduced the unnecessary redundant events sent to telephony registry,
even though it has a duplicate detection mechanism.
This are also two behavioral changes.
1. Previously if a data connection supports multiple APN types,
there will be multiple data connection state changed event for
each APN type. Now there is only one. The listener should use
PreciseDataConnectionState.getApnSetting().getApnTypeBitmask()
to check which APN types this data connection supports.
2. If setup data call fails before a data connection instance
can be created, there won't be any event with fail cause.
Fix: 161572838
Test: FrameworksTelephonyTests and manual
Merged-In: I9723d5284c2a8fbae9f63179dc30ddc42da1d0fc
Change-Id: I9723d5284c2a8fbae9f63179dc30ddc42da1d0fc
(cherry picked from commit 34a09a4cbd)
- Currently, a new callback is created when a listener
is passed in, so it is possible to create multiple
callbacks for the same listener
- However, when removing the listener, only the latest
entry is removed, which could result in improper cleanup
- If a listener is already in the map, do not add the listener
with the new callback
Change-Id: I46f344eb55db38916224f7765cd838347ac8f0f2
Bug: 168886894
Update the callback for emergency SMS to follow the same pattern as for
emergency calls for API consistency.
Fixes: 168269065
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: If27771aef1858ea92dd620b56368d1a6a4f61ab3