Commit Graph

168 Commits

Author SHA1 Message Date
Chen Xu
b6d1319d1a telephony annotations part 2
adding missing annotations

Bug: 140908357
Test: Build

Merged-In: I6de632ef7ef01a939971b7d1bacb227ec5ff4048
Change-Id: I6de632ef7ef01a939971b7d1bacb227ec5ff4048
(cherry picked from commit f85cf993d3)
2019-11-20 14:09:16 -08:00
Jayachandran Chinnakkannu
119d0fa9ac Merge "Expose the following as system APIs" 2019-11-15 07:09:56 +00:00
Jayachandran Chinnakkannu
f19833ca7b Merge "Expose the following ServiceState API as system APIs" 2019-11-15 07:08:34 +00:00
Taesu Lee
e376b8ceaf Remove unnecessary class name
Test: build

Change-Id: Iedea0615e5fac0346c890342001fdee35e670cba
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-11-14 15:49:31 -08:00
Jayachandran C
4d62c63adb Expose the following as system APIs
ServiceState.getNrFrequencyRange()
NetworkRegistrationInfo.getNrState()
DataSpecificRegistrationInfo.isUsingCarrierAggregation()

Bug: 111498835
Test: make
Change-Id: I7cdfad2c221dff7cd379627e7dddedc57bb081bb
2019-11-14 18:41:01 +00:00
Jayachandran C
98e84ea06a Expose the following ServiceState API as system APIs
getOperatorAlphaLongRaw()
getOperatorAlphaShortRaw()

Bug: 111498835
Test: Make
Change-Id: Idcdcbd021f2e147604f0bd853d48f52d434c6fd2
2019-11-14 10:32:28 -08:00
Sarah Chin
ef2ef62cac Add NETWORK_TYPE_NR to Telephony framework
Add NETWORK_CLASS_5_G to TelephonyManager
Add NR to ServiceState

Bug: 135421985
Test: atest FrameworksTelephonyTests
Change-Id: Iaed46354400c7a1ce410eebc246892d7edf448dc
Merged-In: Iaed46354400c7a1ce410eebc246892d7edf448dc
2019-11-14 09:18:01 -08:00
Chen Xu
7631ff7c48 new telephony annotation class
This is a preparatory work for mainline. since Intdef is hidden, so we
have to move some annotations (applied in SDK/system API) to a separate
annotation class and having other module statically link to it.

TODO: include telephony annotation in framework-non-updatable-sources

Bug: 140908357
Test: Build
Change-Id: I37f8a0624bbf27f264870ee9dbf03d3aaa5cadc1
(cherry picked from commit c9d4ee112e)
Merged-in: I37f8a0624bbf27f264870ee9dbf03d3aaa5cadc1
(cherry picked from commit 4712711d3d91621083bf92f5a1647b92c20a8b81)
2019-11-04 21:26:50 +00:00
Jordan Liu
d41a61df80 Merge "Change CellBroadcast APIs to SystemApi"
am: 82454e029f

Change-Id: Ic39446ab84f910b0f5225ad42f061e2a525ec868
2019-09-03 13:52:14 -07:00
Jordan Liu
e4141f0e8b Change CellBroadcast APIs to SystemApi
Bug: 135956699
Test: atest SmsManagerPermissionTest
Change-Id: Ibbb22505a80567d1c08cffe9b7a7fdbd10890abe
Merged-In: Ibbb22505a80567d1c08cffe9b7a7fdbd10890abe
2019-09-03 11:32:58 -07:00
Jack Yu
75cddbf992 Merge "Reverted to the old logic for APN selection" into qt-dev
am: 5d02fcb146

Change-Id: If610d4ffd6101a18c15eb52a1d9d4d0c6e200bce
2019-06-24 16:18:56 -07:00
Jack Yu
ee029fcefa Reverted to the old logic for APN selection
Reverted to the old logic that we select APN based on
RAT, but adding a special handling for 2G cases. This can
deal with the case that some APN settings has EHRPD which
we incorrectly thought that APN setting can be used on CDMA
network.

Bug: 134086103
Test: Unit tests
Change-Id: I557f00d32f53498782394ea7824e316e263ca7e7
2019-06-21 13:54:37 -07:00
Malcolm Chen
aa3512ba9c Make sure on non-dds phone, try MMS data connection when PS is not
attached.

Before setting up data connection, we check if it's on non-dds and
voice is registered on non-LTE network, if true we'll setup the data
connection even if it's not attached.

Bug: 134086103
Test: manual
Change-Id: I43e150c1d0cc4065da07f4a5ec738b967e7a9a6d
Merged-In: I43e150c1d0cc4065da07f4a5ec738b967e7a9a6d
2019-06-19 23:01:49 +00:00
Jack Yu
0ee8d6b347 Merge "Fixed incorrect merge service state" am: 30b14a9d70
am: fbcd558697

Change-Id: I963cedb002267d8d3bf74f645d27b7fca3312368
2019-06-17 23:11:57 -07:00
Jack Yu
e089e39454 Fixed incorrect merge service state
The existing logic for merging service state when device is on
IWLAN does not work properly on AP-assisted mode devices. Fixed
by copying the IWLAN preferred flag into IMS service state so
it can get the correct data RAT for AP-assisted mode devices.

Bug: 134706530
Test: WFC manual tests
Merged-In: Ic18934adb870a0114c913855cdb68e0ef33caa79
Change-Id: Ic18934adb870a0114c913855cdb68e0ef33caa79
(cherry picked from commit 5e640ac80e)
2019-06-17 17:16:13 -07:00
Malcolm Chen
6499e6d95b Make sure on non-dds phone, try MMS data connection when PS is not
attached.

Before setting up data connection, we check if it's on non-dds and
voice is registered on non-LTE network, if true we'll setup the data
connection even if it's not attached.

Bug: 134086103
Test: manual
Change-Id: I43e150c1d0cc4065da07f4a5ec738b967e7a9a6d
2019-06-11 22:22:53 +00:00
Jack Yu
89ccc66963 Considered network preference when simulating legacy data RAT
Correctly supported the legacy data RAT when both cellular
and IWLAN are in service. In this case only report
RAT as IWLAN when any type of APN is preferred on IWLAN.
Otherwise still use the RAT reported by cellular network
service.

Bug: 133516945
Test: Manual

Merged-In: Ifdddad1d5ee95f4576d5002a1b66caafc172cb58
Change-Id: Ifdddad1d5ee95f4576d5002a1b66caafc172cb58
(cherry picked from commit a74f2d8c34)
2019-06-01 00:13:03 -07:00
Jack Yu
a74f2d8c34 Considered network preference when simulating legacy data RAT
Correctly supported the legacy data RAT when both cellular
and IWLAN are in service. In this case only report
RAT as IWLAN when any type of APN is preferred on IWLAN.
Otherwise still use the RAT reported by cellular network
service.

Bug: 133516945
Test: Manual

Change-Id: Ifdddad1d5ee95f4576d5002a1b66caafc172cb58
2019-05-29 11:36:44 -07:00
Jack Yu
aa77f3a308 Fixed concurrent access network registration info
Fixed by adding synchronization block for every place
accessing network registration info in service state.

Bug: 131883293
Test: Manual
Merged-In: Ic10931b7fab998bfebe09d316a2d87886222dae3
Change-Id: Ic10931b7fab998bfebe09d316a2d87886222dae3
(cherry picked from commit 4c11809764)
2019-05-16 16:35:23 -07:00
Jack Yu
4c11809764 Fixed concurrent access network registration info
Fixed by adding synchronization block for every place
accessing network registration info in service state.

Bug: 131883293
Test: Manual
Change-Id: Ic10931b7fab998bfebe09d316a2d87886222dae3
2019-05-16 14:46:45 -07:00
SongFerngWang
f07d64bdc9 Add 5G evolution icon
This add the 5GE icon to the system UI for specific carriers
LTE CA network.

Bug: 124768697
Test: build & manually test:
fake the operator name with pattern, and check the status bar data icon.

Change-Id: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8
Merged-In: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8
2019-04-24 23:03:29 +08:00
Jack Yu
b79342f288 Return copies for get methods
NetworkRegistrationInfo and ServiceState are not
immutable class. Their get methods should return a new
copy of object so the caller won't modify its state.

Bug: 130538118
Test: Unit tests + manual

Merged-In: I51662a92b0b6189a8c8aa017085affedac417190
Change-Id: I51662a92b0b6189a8c8aa017085affedac417190
(cherry picked from commit 37538594e6)
2019-04-19 10:29:01 -07:00
Jack Yu
37538594e6 Return copies for get methods
NetworkRegistrationInfo and ServiceState are not
immutable class. Their get methods should return a new
copy of object so the caller won't modify its state.

Bug: 130538118
Test: Unit tests + manual
Change-Id: I51662a92b0b6189a8c8aa017085affedac417190
2019-04-16 17:17:03 -07:00
SongFerngWang
3cbcf75c4a Add 5G evolution icon
This add the 5GE icon to the system UI for specific carriers
LTE CA network.

Bug: 124768697
Test: build & manually test:
fake the operator name with pattern, and check the status bar data icon.

Change-Id: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8
Merged-In: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8
(cherry picked from commit 2d178eaabb)
2019-04-09 17:54:18 +00:00
Jack Yu
9443c8e966 Fixed incorrect service state populated
ServiceState.setStateOutOfService does not correctly
clean up the information so the old WLAN registration info
got populated for the next time use.

Bug: 130048577
Test: Telephony sanity tests
Merged-In: I7fab7090c22390914af024c44bffd643c13f33e5
Change-Id: I7fab7090c22390914af024c44bffd643c13f33e5
(cherry picked from commit 9302618da6)
2019-04-08 09:45:33 -07:00
Jack Yu
9302618da6 Fixed incorrect service state populated
ServiceState.setStateOutOfService does not correctly
clean up the information so the old WLAN registration info
got populated for the next time use.

Bug: 130048577
Test: Telephony sanity tests
Change-Id: I7fab7090c22390914af024c44bffd643c13f33e5
2019-04-08 01:10:27 -07:00
Jack Yu
138e2af543 Removed data and voice RAT from service state
The voice and data RAT are now derived from
CS and PS network registration info.

Test: Manual + unit tests
Bug: 129863444

Merged-In: I3f4cb6057a4ae821363099583eeac7c867147afb
Change-Id: I3f4cb6057a4ae821363099583eeac7c867147afb
(cherry picked from commit 5ff5ab5649)
2019-04-03 15:26:21 -07:00
Jack Yu
5ff5ab5649 Removed data and voice RAT from service state
The voice and data RAT are now derived from
CS and PS network registration info.

Test: Manual + unit tests
Bug: 129863444

Change-Id: I3f4cb6057a4ae821363099583eeac7c867147afb
2019-04-03 12:15:18 -07:00
Jack Yu
12a29b5621 Renamed DataSpecificRegistrationState
Renamed DataSpecificRegistrationState to
DataSpecificRegistrationInfo. And added some
APIs to test API so they can be accessed by
CTS.

Test: Manual
Bug: 127657991

Merged-In: I1a623c18f02cfd19ca1af9df912d859b363f42d1
Change-Id: I1a623c18f02cfd19ca1af9df912d859b363f42d1
(cherry picked from commit dba103204c)
2019-03-26 22:17:15 -07:00
Cody Kesting
02f144a8e9 Merge "Annotate Data and Voice Roaming setters with @TestApi." am: e1dda15d6c am: c028f7a57a
am: 66fb2bf986

Change-Id: Iba01930bc02239e54bd05ef4e98a99cdb74d4be4
2019-03-22 18:53:41 -07:00
Treehugger Robot
e1dda15d6c Merge "Annotate Data and Voice Roaming setters with @TestApi." 2019-03-23 01:03:31 +00:00
Jack Yu
dba103204c Renamed DataSpecificRegistrationState
Renamed DataSpecificRegistrationState to
DataSpecificRegistrationInfo. And added some
APIs to test API so they can be accessed by
CTS.

Test: Manual
Bug: 127657991
Change-Id: I1a623c18f02cfd19ca1af9df912d859b363f42d1
2019-03-22 00:06:50 -07:00
Jack Yu
c876b65663 IWLAN API review changes
Made several API changes per API council
suggestions.

Test: Manual + unit tests
Bug: 127812471
Bug: 128607082

Merged-In: I0f93c07207b10b566e9f858361e55b18dc0881a0
Change-Id: I0f93c07207b10b566e9f858361e55b18dc0881a0
(cherry picked from commit 806b64228d)
2019-03-21 14:12:24 -07:00
Jack Yu
806b64228d IWLAN API review changes
Made several API changes per API council
suggestions.

Test: Manual + unit tests
Bug: 127812471
Bug: 128607082
Change-Id: I0f93c07207b10b566e9f858361e55b18dc0881a0
2019-03-20 23:07:25 -07:00
Jack Yu
1b9eafb4f4 API review feedback changes
Made the follwing changes based on API council review
feedback

1. Made the class and its Builder class final
2. Removed methods that should not be in the builder
3. Changed the return type of available services
   from array to list.

Test: Unit tests
Bug 127657991

Merged-In: I3c2d406fed3ddaf62dee193c7657caf8c5bc13d2
Change-Id: I3c2d406fed3ddaf62dee193c7657caf8c5bc13d2
(cherry picked from commit 20d71403b8)
2019-03-20 14:08:27 -07:00
Jack Yu
936c536bba Merge "Renamed NetworkRegistrationState to NetworkRegistrationInfo" 2019-03-20 06:30:53 +00:00
Cody Kesting
c163113c6d Merge "Add class comment to avoid extending ServiceState class." am: f0a67227c4 am: 0b0d934919
am: 2315621839

Change-Id: Ifdf2427161abde18695ee9575032af3db9ca308e
2019-03-19 17:20:40 -07:00
Cody Kesting
e19048e52b Annotate Data and Voice Roaming setters with @TestApi.
CTS testing for ServiceState's getRoaming() requires using
setDataRoamingType() and setVoiceRoamingType() for preparing state.
These are currently annotated as @hide and @UnsupportedAppUsage, with a
maxTargetSdk of P.

Bug: 74207290
Test: atest CtsTelephonyTestCases:ServiceStateTest
Change-Id: I08efeeae81494c0431ce34c5d68a73d4824c8d1d
2019-03-19 14:44:04 -07:00
Jack Yu
20d71403b8 API review feedback changes
Made the follwing changes based on API council review
feedback

1. Made the class and its Builder class final
2. Removed methods that should not be in the builder
3. Changed the return type of available services
   from array to list.

Test: Unit tests
Bug 127657991

Change-Id: I3c2d406fed3ddaf62dee193c7657caf8c5bc13d2
2019-03-19 07:01:22 -07:00
Cody Kesting
1961871f40 Add class comment to avoid extending ServiceState class.
ServiceState implements Parcelable and all 'Parcelables' are required to
be final, per the Android API Guidelines (go/android-api-guidelines).
This won't be changed for historical reasons, but clients should avoid
extending this class.

Bug: 128865231
Test: non-functional change that won't impact tests.
	atest CtsTelephonyTestCases:ServiceStateTest
Change-Id: Ib369f1449a3e085f404fff1c706fda0b76d42890
2019-03-19 13:57:28 +00:00
Jack Yu
f9d06c78d8 Renamed NetworkRegistrationState to NetworkRegistrationInfo
API review changes. The class covers more information other than
registration state.

Test: Build
Bug: 127657991
Merged-In: I8af36b388182ab08257b64c37078f156d4821709
Change-Id: I8af36b388182ab08257b64c37078f156d4821709
(cherry picked from commit e27d3fde88)
2019-03-19 06:55:12 -07:00
Jack Yu
e27d3fde88 Renamed NetworkRegistrationState to NetworkRegistrationInfo
API review changes. The class covers more information other than
registration state.

Test: Build
Bug: 127657991
Change-Id: I8af36b388182ab08257b64c37078f156d4821709
2019-03-18 00:17:54 -07:00
Treehugger Robot
b7463a63d1 Merge "Moved transport to IntDef" 2019-03-15 23:21:29 +00:00
Jack Yu
e4edae3798 Merge "Moved transport to IntDef" 2019-03-15 21:16:42 +00:00
Cody Kesting
a49171ea5c Merge "Fix ServiceState.hashCode() bug." am: 466ff7b990 am: 842fd65fe4
am: 11d091f9da

Change-Id: Idab8b65c1b71d25c71db12928d363e9e28b4f662
2019-03-15 09:40:27 -07:00
Cody Kesting
99ef1d40dc Fix ServiceState.hashCode() bug.
ServiceState currently overrides hashCode() incorrectly. It hashes an
Array field without using Arrays.hashCode(), meaning that the default
Object.hashCode() implementation is used (which is based on the address
of the Array field). This allows equivalent ServiceState instances to
produce different hashes.

Bug: 128609620
Test: atest CtsTelephonyTestCases:ServiceStateTest
Change-Id: I40a7d0b7ebab6d2a1be47ea63a6d223c4c13700b
2019-03-15 15:46:09 +00:00
Jack Yu
6f7b30499c Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Merged-In: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 20:32:16 -07:00
Jack Yu
ef25faf013 Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 19:24:49 -07:00
Jack Yu
0c5a824b19 Merge changes from topic "iwlan_api" am: 83181d80c8 am: a98b285b56
am: a8ae91bd4d

Change-Id: I7e84a7c043013a833a893e0c818e9a6d3141e3e4
2019-03-05 18:11:54 -08:00
Jack Yu
6bd48a24cf Fixed IWLAN related APIs issue
Fixed APIs that not meeting API review requirement.
1. Changed createXxxServiceProvider to onCreateXxxServiceProvider
2. Added builder for NetworkRegistrationState

Test: Manual
Bug: 126552434

Change-Id: Idb2411a47caf61e83fe26b98e393fa851ac1759d
2019-03-05 10:52:06 -08:00