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.
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
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
- 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
To support the new listen event, use long instead of int for the new one then creat bitmask for old events.
Bug: 162300897
Test: manual - 5g testing
Change-Id: I002cb3579eb920ffc0b0a8dbf59e8d1153222411
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.
Exempt-From-Owner-Approval: Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Clarify structure of the argument for the onEmergencyNumberListChanged
callback based on API council feedback.
Bug: 166230518
Test: NA
Change-Id: I9819337da12a17dc4736ba97b00018a156274680
Revert "Snap for 6792834 from 5b681187dce32555f398c1b823b82be3a4..."
Revert "Snap for 6792834 from ff268453a3067874ebba3646e8e9fdbc04..."
Revert "Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328de6e34..."
Revert "Snap for 6792834 from 38626f86b924625d27d752950ce04045e6..."
Revert "Snap for 6792834 from a2cb05379b86f00033bd19912e1d6031f6..."
Revert "Snap for 6792834 from f1e69b45bde30a055d37260012df8e951b..."
Revert "Snap for 6792834 from 9215e252c9daaad53a18582afe5478eb6c..."
Revert "Snap for 6792834 from c9d246d88c86368fddcaa9f58d6eec740f..."
Revert "Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1f42331..."
Revert "Snap for 6792834 from d6d5105b22925ff168be784af9fb044fdd..."
Revert "Snap for 6792834 from e8dc6bf8735df45be9eb7867921243d83d..."
Revert "Snap for 6792834 from de2e193ad770855a0cdc7b96d91a13929b..."
Revert "Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8857dc7..."
Revert "Snap for 6792834 from 1529174442dc31e0036c58fba7a90184ee..."
Revert "Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d953019..."
Revert "Snap for 6792834 from 1a8f386df1be8e4692c00dda348f4addfb..."
Revert "Snap for 6792834 from d5d749da0ba5e53684535fae5eb76c085f..."
Revert "Snap for 6792834 from bc7dc6f5c75789d25879762854a071bd1b..."
Revert "Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df331300..."
Revert "Snap for 6792834 from bdbd076341f75ed0416f4cda0a98fc6f54..."
Revert "Snap for 6792834 from 201eaa68fcc0781df6f7713901fd5a0862..."
Revert "Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d5db563..."
Revert "Snap for 6792834 from 82eecc9b3c895d356fca70f4b8def94600..."
Revert "Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d33be247..."
Revert "Snap for 6792834 from 4b73f247850059a4312525662991d73359..."
Revert submission 12462888-release-request-aa3875fd-ef4c-4f66-9a1c-b0b05058d091-for-git_main-busytown-release-6792834
Reason for revert: Bad snap due to branch misconfig.
Reverted Changes:
I950c3960b:Snap for 6792834 from de2e193ad770855a0cdc7b96d91a...
Ie6452b91a:Snap for 6792834 from c9d246d88c86368fddcaa9f58d6e...
I6b98cb766:Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d...
Ie5e19aaef:Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b...
I35385da96:Snap for 6792834 from 4b73f247850059a4312525662991...
I1a59949e5:Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df...
I2c40ffbc2:Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1...
I24c147f50:Snap for 6792834 from ff268453a3067874ebba3646e8e9...
Iabb2fe4c1:Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8...
I92bfbb5d5:Snap for 6792834 from 0ad493cce4f8f187dc37671b45d5...
I2e92b2d5d:Snap for 6792834 from f1e69b45bde30a055d37260012df...
I0fdb356fa:Snap for 6792834 from a2cb05379b86f00033bd19912e1d...
I9b19f9bdc:Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d3...
Ie88e387a6:Snap for 6792834 from 9215e252c9daaad53a18582afe54...
Idc1ae35dd:Snap for 6792834 from 201eaa68fcc0781df6f7713901fd...
Ib16deadd9:Snap for 6792834 from 1a8f386df1be8e4692c00dda348f...
I744f889d3:Snap for 6792834 from d5d749da0ba5e53684535fae5eb7...
Ib6e060e44:Snap for 6792834 from bdbd076341f75ed0416f4cda0a98...
Iab587ff78:Snap for 6792834 from e8dc6bf8735df45be9eb78679212...
Ia1f4ef82f:Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d...
Ief930c2b5:Snap for 6792834 from 5b681187dce32555f398c1b823b8...
Ia71445b6a:Snap for 6792834 from 38626f86b924625d27d752950ce0...
Ia95c82cfc:Snap for 6792834 from 1529174442dc31e0036c58fba7a9...
If1e1b5e35:Snap for 6792834 from bc7dc6f5c75789d25879762854a0...
I98959e228:Snap for 6792834 from 1e7f83c953b7571dceabd5d7f6a2...
I321c4cb8b:Snap for 6792834 from d6d5105b22925ff168be784af9fb...
I3ed2d46ee:Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328...
Id4a7f102c:Snap for 6792834 from 82eecc9b3c895d356fca70f4b8de...
Change-Id: I4b944b89f3c581fbd67f5952d9ec413d02756abc
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
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
Change-Id: I9723d5284c2a8fbae9f63179dc30ddc42da1d0fc
There are many bursts of 'onSubscriptionsChangedListener callback
received.' log messages that contribute greatly to log spam. If this
message is not actively helping, then it should be removed.
Bug: 161949307
Test: this log doesn't appear
Change-Id: I9f9f2f8fa49bf50bbc9a33193d3b58813627329d
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.
Exempt-From-Owner-Approval: Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: I36e3562b72e64b51e4febd1d42a3bc8e4dc60988
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.
Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Add documentation that indicates the requirement for location
permissions to more methods and constants in PhoneStateListener.
Bug: 158523376
Test: docs only
Change-Id: I9d785fd0fc9671652c4edb3bf7cc6184273120b8
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.
To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
- worked around by fully qualifying the constructor
Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.
To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
- worked around by fully qualifying the constructor
Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Unhide several constants and update the documentation for
android.telephony.DisconnectCause to reflect where it's being used.
Fixes: 154826441
Test: build
Change-Id: Ib3177367519a704bb469bc494f686c96fb516b85
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
Merged-In: I4d6681d90705b68c3349f4124e434a29b50fd3a2
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