Commit Graph

129 Commits

Author SHA1 Message Date
Andrew Sapperstein
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
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)
2020-05-01 18:25:32 +00:00
Hall Liu
ecced7ad86 Merge "Unhide and update documentation for DisconnectCause" am: 61a728aebf am: d4e270a8ef
Change-Id: I63b1ed212848529fac75f072c3b6337e46ab527b
2020-04-28 18:18:22 +00:00
Hall Liu
6884145ba3 Unhide and update documentation for DisconnectCause
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
2020-04-27 17:57:17 -07:00
Jack Yu
ecfb37b868 Renamed DisplayInfo to TelephonyDisplayInfo
To reduce ambiguity with android.view.DisplayInfo.

Test: Telephony sanity tests + unit tests
Bug: 151101989
Merged-In: Ic507b6bf082ca5510ff6d1dcde501f5be9ef074f
Change-Id: Ic507b6bf082ca5510ff6d1dcde501f5be9ef074f
(cherry picked from commit ac3ca33567)
2020-04-20 09:22:33 -07:00
Hall Liu
0a5365b9c0 Add gating, logging for PhoneStateListener's limit
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
2020-04-07 17:13:19 -07:00
Hall Liu
1002495afa Institute limit on PhoneStateListener
Limit apps to 50 concurrently registered instances of PhoneStateListener
via TelephonyManager#listen

Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testListenerLimit
Bug: 151835251
Change-Id: I8486d86773a1e28b4018620c48003855dae75b9d
Merged-In: I8486d86773a1e28b4018620c48003855dae75b9d
2020-04-07 17:13:14 -07:00
Sarah Chin
bab3e662df Add method to reset network types
Test: build
Bug: 148218045
Change-Id: Ia6eaba4e40fe47e79f8a7b6bcbadc61151d84823
Merged-In: Ia6eaba4e40fe47e79f8a7b6bcbadc61151d84823
2020-03-31 12:57:03 -07:00
Hall Liu
952697b886 Merge changes from topic "phonestatelistener-limit-rvc-dev" into rvc-dev
* changes:
  Add gating, logging for PhoneStateListener's limit
  Institute limit on PhoneStateListener
2020-03-28 06:48:56 +00:00
Hall Liu
ed6d6e69a8 Add gating, logging for PhoneStateListener's limit
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
2020-03-27 19:21:51 -07:00
Hall Liu
2da50cfe33 Institute limit on PhoneStateListener
Limit apps to 50 concurrently registered instances of PhoneStateListener
via TelephonyManager#listen

Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testListenerLimit
Bug: 151835251
Change-Id: I8486d86773a1e28b4018620c48003855dae75b9d
2020-03-27 16:38:40 -07:00
Sarah Chin
b93bf72090 Merge "API review: SubscriptionPlan#getNetworkTypes/setNetworkTypes" 2020-03-26 03:41:29 +00:00
Shuo Qian
0d8a3bb0f6 Merge "Hide several System APIs" 2020-03-25 23:11:27 +00:00
Hall Liu
66fc127ad1 Merge "Expose all TelephonyRegistryManager methods" 2020-03-25 20:53:10 +00:00
sqian
bc1f641138 Hide several System APIs
Test: Treehugger
Bug: 151241308
Change-Id: Ie611320f4651b83e0ced6f5c8fede34a8a0a41c1
Merged-In: Ie611320f4651b83e0ced6f5c8fede34a8a0a41c1
(cherry picked from commit 1e154a345c)
2020-03-24 18:40:23 -07:00
Hall Liu
2499c26a49 Expose all TelephonyRegistryManager methods
Expose all the methods as SystemApis for telephony to use.

Fixes: 148114017
Test: atest TelephonyRegistryManagerTest
Change-Id: I43537bf741742eb9e8df1a55e20cc3c8b2bbd874
Merged-In: I43537bf741742eb9e8df1a55e20cc3c8b2bbd874
2020-03-25 01:08:12 +00:00
Amit Mahajan
4009110b3b Un-expose APIs added for telephony mainline.
Will be reworked on in R.

Test: basic sanity
Bug: 140908357
Change-Id: Ib18b66c9351b0434d7c46e004cd162928d7133f7
2020-03-21 00:21:48 +00:00
Sarah Chin
14f87a28d8 API review: SubscriptionPlan#getNetworkTypes/setNetworkTypes
Default value is TelephonyManager#getAllNetworkTypes instead of null

Test: atest SubscriptionManagerTest, DcTrackerTest
Bug: 148218045
Change-Id: If7a46be43648a337ca11ca9dcb30bc532829ef43
Merged-In: If7a46be43648a337ca11ca9dcb30bc532829ef43
2020-03-20 16:40:03 -07:00
Meng Wang
ba66f0f761 SubscriptionPlan: remove getNetworkTypesBitMask
To avoid using hidden API TelephonyManager#getBitMaskForNetworkType

Bug: 140908357
Test: make
Change-Id: Ibb04fd43117d4b7cf9f768e6ccf9a8f605a2f5e8
Merged-In: Ibb04fd43117d4b7cf9f768e6ccf9a8f605a2f5e8
2020-03-20 16:37:57 -07:00
Sarah Chin
a59764edc9 Add method to reset network types
Test: build
Bug: 148218045
Change-Id: Ia6eaba4e40fe47e79f8a7b6bcbadc61151d84823
2020-03-20 14:36:51 -07:00
TreeHugger Robot
0e56c85768 Merge "Renamed DisplayInfo to TelephonyDisplayInfo" into rvc-dev 2020-03-19 14:29:24 +00:00
Jack Yu
f86bf75928 Fixed the doc
Added extra information

Test: None
Bug: 150126754
Merged-In: Ice5032ba84a24dd5d9091f80303ccbbc3bd1ff20
Change-Id: Ice5032ba84a24dd5d9091f80303ccbbc3bd1ff20
(cherry picked from commit f23e44e84b)
2020-03-18 21:34:32 -07:00
Jack Yu
ac3ca33567 Renamed DisplayInfo to TelephonyDisplayInfo
To reduce ambiguity with android.view.DisplayInfo.

Test: Telephony sanity tests + unit tests
Bug: 151101989
Change-Id: Ic507b6bf082ca5510ff6d1dcde501f5be9ef074f
2020-03-18 15:11:31 -07:00
Sarah Chin
210bccd974 Merge "API review: SubscriptionPlan#getNetworkTypes/setNetworkTypes" into rvc-dev 2020-03-18 19:52:26 +00:00
Nathan Harold
61b5d6741b Add Callback to notify changes of barring status
-Create a BarringInfo class to pass Barring information
 from HAL to PhoneStateListener.
-Add a multi-callback registrant so that ServiceStateTracker
 and potentially DcTracker can also listen to barring info in
 the future.

Bug: 143226991
Test: make update-api && make && atest BarringInfoTest
Merged-In: I08240259f3142beeca991238bf705236f0303954
Change-Id: I08240259f3142beeca991238bf705236f0303954
2020-03-18 09:52:10 -07:00
Shuo Qian
1e154a345c Hide several System APIs
Test: Treehugger
Bug: 151241308
Change-Id: Ie611320f4651b83e0ced6f5c8fede34a8a0a41c1
2020-03-17 04:41:21 +00:00
Sarah Chin
37bb944836 API review: SubscriptionPlan#getNetworkTypes/setNetworkTypes
Default value is TelephonyManager#getAllNetworkTypes instead of null

Test: atest SubscriptionManagerTest, DcTrackerTest
Bug: 148218045
Change-Id: If7a46be43648a337ca11ca9dcb30bc532829ef43
2020-03-16 19:21:47 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Daniel Bright
60fe698771 Whitelist telephony broadcasts for bground use
Whitelisted telephony broadcasts using the intent background flag.
Ensured that each broadcast was protected manually through cts test below.

Bug: 148181747
Bug: 151112539
Test: Switched on ActivityManagerDebugConfig.DEBUG_BACKGROUND_CHECK for SIM_STATE_CHANGED
Test:  android.telephony.cts.TelephonyProtectedBroadcastsTest
Merged-In: Id280fc2128b84dda2a8184dfa32ecc5b8f787afb
Change-Id: Id280fc2128b84dda2a8184dfa32ecc5b8f787afb
2020-03-11 17:07:23 -07:00
Jack Yu
987b8df24d Added telephony display info support
Added the new APIs allowing clients like System UI to display
network icons correctly based on the provided telephony display
info.

Test: Telephony sanity tests
Bug: 148540139
Change-Id: I4dfb6eb7a313539e0565a4239d555426f12e503e
Merged-In: I4dfb6eb7a313539e0565a4239d555426f12e503e
2020-03-03 11:21:05 -08:00
TreeHugger Robot
9c8f402a68 Merge "Fixed the doc" into rvc-dev 2020-03-02 22:03:11 +00:00
Jack Yu
f23e44e84b Fixed the doc
Added extra information

Test: None
Bug: 150126754
Change-Id: Ice5032ba84a24dd5d9091f80303ccbbc3bd1ff20
2020-03-02 11:53:27 -08:00
Amit Mahajan
da6a199972 Hide TelephonyRegistryManager.
This was added for telephony mainline, and as such is not needed in
R now.

Test: basic sanity
Bug: 149850449
Merged-in: I2b47ab45839f07494dcad4f1878809a55ddd3087
Change-Id: I2b47ab45839f07494dcad4f1878809a55ddd3087
(cherry picked from commit 7411d22e57)
2020-02-27 16:58:09 -08:00
Amit Mahajan
7411d22e57 Hide TelephonyRegistryManager.
This was added for telephony mainline, and as such is not needed in
R now.

Test: basic sanity
Bug: 149850449
Change-Id: I2b47ab45839f07494dcad4f1878809a55ddd3087
2020-02-26 23:04:04 +00:00
Jack Yu
59e09ca52a Merge "Added telephony display info support" 2020-02-13 17:42:54 +00:00
Jack Yu
73036c4075 Added telephony display info support
Added the new APIs allowing clients like System UI to display
network icons correctly based on the provided telephony display
info.

Test: Telephony sanity tests
Bug: 148540139
Change-Id: I4dfb6eb7a313539e0565a4239d555426f12e503e
2020-02-12 20:31:22 -08:00
Meng Wang
9c99325b87 Revert "System API used by telephony to bind to WapPushManager app."
This reverts commit e6a40697e1.

Reason for revert: API review comments

Bug: 148179277
Change-Id: I729e1c27492b25cfcdb4244e294672ba34a7e7ea
2020-02-10 14:42:41 -08:00
Nathan Harold
0d9a92bd53 Update Privileges for BARRING_INFO and REG_FAILURE
Modify the privilege for LISTEN_BARRING_INFO and for
LISTEN_REGISTRATION_FAILURE to require READ_PRECISE_PHONE_STATE.

Because both of these should only be of interest to special-
purpose applications such as Carrier Apps or diagnostics apps,
limit the permissions to encourage barring info to be collected
via NET_CAPABILITY_NOT_CONGESTED, and for registration failure
to be learned in a more digestible fashion via ServiceState.

Bug: 149061935
Test: atest TelephonyManagerPermissionTest && atest CarrierApiTest
Change-Id: If8c915745951d745a5b30e9c44732db704f09a8d
2020-02-06 21:12:30 -08:00
Jack Yu
d588c33c71 Added area info support in cell broadcast service
Added a broadcast for area info changed event, and
also a get method in cell broadcast service to
retrieve the area info.

Test: Cell broadcast sanity tests
Bug: 141318859

Merged-In: I5995e3c5099a1e49cb0c54d33da1dbfcc94d4037
Change-Id: I5995e3c5099a1e49cb0c54d33da1dbfcc94d4037
(cherry picked from commit afaa71d418)
2020-02-04 17:03:01 -08:00
Automerger Merge Worker
331dc63204 Merge "Add LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH into Shell permission" am: a3243e8e6e am: 535739cdd7 am: 16d8f3ccc6
Change-Id: I57eba979ba1146a349c2cd85f0e5d5129006e398
2020-01-31 16:57:19 +00:00
Daniel Bright
3f6ebb55ff Merge "Whitelist telephony broadcasts for bground use" 2020-01-30 23:45:52 +00:00
sqian
dfdee636e3 Add LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH into Shell permission
> Is the minimally scoped permission that needs to be added?
This is a minimal permission for always listening to signal strength.

> What options did you explore that did not need this permission?
CTS is required by API council; Telephony CTS is using shell to have
system permission. I don't see other options.

Integrate the callback of LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH

Test: CTS; https://paste.googleplex.com/5811446241820672
Bug: 147322848
Change-Id: Id5afd261a7f00c25e3af3558f30fb92aad42f060
2020-01-30 14:14:43 -08:00
Daniel Bright
8acac15ced Whitelist telephony broadcasts for bground use
Whitelisted telephony broadcasts using the intent background flag.
Ensured that each broadcast was protected manually through cts test below.

Bug: 148181747
Test: Switched on ActivityManagerDebugConfig.DEBUG_BACKGROUND_CHECK for SIM_STATE_CHANGED
Test:  android.telephony.cts.TelephonyProtectedBroadcastsTest
Change-Id: Id280fc2128b84dda2a8184dfa32ecc5b8f787afb
2020-01-29 16:46:05 -08:00
Rambo Wang
879bc4ae15 Merge "Clear up permission READ_PRIVILEGED_PHONE_STATE." 2020-01-29 22:06:11 +00:00
Jack Yu
afaa71d418 Added area info support in cell broadcast service
Added a broadcast for area info changed event, and
also a get method in cell broadcast service to
retrieve the area info.

Test: Cell broadcast sanity tests
Bug: 141318859

Change-Id: I5995e3c5099a1e49cb0c54d33da1dbfcc94d4037
2020-01-28 21:05:25 -08:00
Rambo Wang
63ebb4b126 Clear up permission READ_PRIVILEGED_PHONE_STATE.
- Group all events that need the permisson together
- Enforce the permission of the group mask instead of multiple individuals
- Clear up javadoc of APIs require the permission

Bug: 148021947
Test: make offline-sdk-docs
Test: atest com.android.internal.telephony.TelephonyRegistryTest
Test: atest android.telephony.cts.PhoneStateListenerTest
Test: atest com.android.internal.telephony.PhoneStateListenerTest

Merged-In: I6c801039e3eaf22bae052de6569cf1d9a5b28396
Change-Id: I6c801039e3eaf22bae052de6569cf1d9a5b28396
(cherry picked from commit aac979e1c102c7274dac89b674b5709002d02705)
2020-01-29 04:29:27 +00:00
Jordan Liu
dd6d0b26af Merge "Fix ordered background broadcast API" 2020-01-28 16:33:18 +00:00
Meng Wang
489e391d8f TelephonyManager: do not acceess hidden API
... PhoneStateListener.mSubId; move the logic to
TelephonyRegistryManager.

Bug: 140908357
Test: make
Change-Id: I2594cdfe178b02aeab9f88dc16586418eca985ff
2020-01-27 18:10:24 -08:00
sqian
6cd260243a Support always reporting signal strength phone state listener
We should not allow other stack (such as Bluetooth) to directly control
 modem indication reporting. The hidden API
 TelephonyManager.setRadioIndicationUpdateMode added before do not
 support multiple clients and do not support the case when clients'
 process die.

The new solution would be adding a new listener
 PhoneStateListener.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH and let
 telephony registry (which is running under system process) to tell
 telephony whether to always turn on signal strength update if any client
 is listening to this event.

Introduce a new system API for TelephonyRegistry
to tell Telephony module this listening mechanism.

Introduce a new permision for this function

Test: WIP (Have this CL out to try to catch up the API deadline)
Bug: 147322848

Change-Id: Iaee832c75b29d89dbc9e5c6659e1a7e89c4a467f
Merged-In: Iaee832c75b29d89dbc9e5c6659e1a7e89c4a467f
(cherry picked from commit 93642d4433)
2020-01-27 14:20:09 -08:00
Jordan Liu
f026bce66c Fix ordered background broadcast API
This API is only intended for a specific use, so do not allow the caller
to pass in other intents and use it for other things.

Bug: 144108192
Test: atest CellBroadcastIntentsTest
Change-Id: Ibf70fdbb419bbb24f2feeffedc0331e31c865a52
Merged-In: Ibf70fdbb419bbb24f2feeffedc0331e31c865a52
2020-01-27 21:58:19 +00:00