Commit Graph

3276 Commits

Author SHA1 Message Date
Chen Xu
996f047394 Merge "Add NR to preferred network type combination" 2019-02-02 01:24:00 +00:00
Amit Mahajan
13d5d5a1c8 Merge "Fix wrong userData length and excessive userData issues" 2019-02-01 22:25:37 +00:00
Holly Jiuyu Sun
2638587995 Merge "Handle permission check for multi-active SIMs devices." 2019-02-01 04:16:50 +00:00
Taesu Lee
309fc2d4a8 Fix wrong userData length and excessive userData issues
Added checking size excess in encodeUCS2() and an exception cause in
EncodeException to distinguish between unencodable char and size excess.
It will prevent wrong userData length and excessive userData issues
during encoding userData. Please see below one issue scenario.

stringToGsm7BitPackedWithHeader() throws an EncodeException when
septeCount > 255. The EncodeException is caught and encoding again
through encodeUCS2(). However, the length of encoded userData as UCS-2
is converted as Byte without checking size excess. Thus first byte of
userData will be wrong and total userData will exceed maximum User Data.

Test: Manual

Change-Id: Ib6df5484072d77548e8adcbcbd15ad7a401c99f8
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-02-01 08:51:56 +09:00
Brad Ebinger
3811aba3a4 Merge "Add new ImsException to better handle ImsService errors" 2019-01-31 23:26:57 +00:00
chen xu
a143659d29 Add NR to preferred network type combination
This add NR 5G to preferred network type and move preferredNetworkMode
from SystemApi to hidden api as we are not going to support
preferredNetworMode enum in the future.

Bug: 111453000
Test: build
Change-Id: I08a8f7bf44a62ef109583b82b22f65fd6f89c71d
(cherry picked from commit 8bcdc4cf66)
Merged-in: I08a8f7bf44a62ef109583b82b22f65fd6f89c71d
2019-01-31 00:44:52 -08:00
Holly Jiuyu Sun
a2c1da0847 Handle permission check for multi-active SIMs devices.
For download and switch, if the caller can manage (has carrier privilege)
on any active sub on any other slots && the caller can manage the active
sub on the target slot or there is no active sub on the target slot, we
allow the caller to continue download. Otherwise, we require user consent.
For getting EID, we now check whether the caller has privilege on the
target card with the given cardId.
Other logic including the logic for single-active slot still keep the
same.
Also, open disable sub (switch to empty sub) to privileged carrier apps
instead of just system.

Bug: 36260308
Bug: 120621262
Test: unit test, test on phone
Change-Id: Icfc0c9e9f4303876bceb1adbe217b39b538b347e
Merged-In: Icfc0c9e9f4303876bceb1adbe217b39b538b347e
2019-01-30 20:33:31 -08:00
Nazanin Bakhshi
87da0245c0 Add a method to determine if a reboot is required to alter the modem config
Bug: 123101701
Test: sanity
Change-Id: I841b947efda0016c003f54ecf7853624582abab9
Merged-In: I841b947efda0016c003f54ecf7853624582abab9
(cherry picked from commit 7eca4afab4)
2019-01-31 04:17:18 +00:00
Nazanin Bakhshi
458a474998 Add telephony API to switch multi sim config
Bug: 122115649
Test: sanity
Change-Id: Idace8ed7f3fe78a6ce831225bda499a58a34c80f
Merged-In: Idace8ed7f3fe78a6ce831225bda499a58a34c80f
(cherry picked from commit 1e031bde1a)
2019-01-30 23:19:14 +00:00
Chen Xu
ebad5a64d0 Merge "new API for IMS call fail cause" 2019-01-30 18:01:56 +00:00
Michele
233d6b292f Add APIs to get/set if usage of multiple SIMs is restricted.
Add API that indicates if the usage of multiple SIMs at the same time is
allowed or restricted in order to support requirements from carriers for
dual SIM devices

Bug: 123537730
Test: Verified with test application.
Change-Id: I5e3e5ff41927e43ead4a30988630cf9125d5a048
Merged-In: I5e3e5ff41927e43ead4a30988630cf9125d5a048
(cherry picked from commit 398d5d9113)
2019-01-29 17:38:23 -08:00
Jordan Liu
bd4a4dc889 Merge "Card ID APIs are public" 2019-01-29 22:43:47 +00:00
Jordan Liu
d6c684fff4 Card ID APIs are public
These were system API but we should expose them for apps with carrier
privileges.

Test: manual
Bug: 122974656
Change-Id: Ie60e4c580dfa9dd0d7d6fb6b94226661d0620dad
2019-01-29 10:55:35 -08:00
chen xu
0f49468184 new API for IMS call fail cause
Bug: 119890559
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: Ia047b7ba2345ad0c8d998506026defc02eb80dc9
(cherry picked from commit 6ac5fc19e6)
Merged-in: Ia047b7ba2345ad0c8d998506026defc02eb80dc9
2019-01-28 23:07:37 -08:00
Treehugger Robot
d20bdb915a Merge "uce: Updating UCE API to accept ICC-ID." 2019-01-29 04:43:32 +00:00
Pengquan Meng
5cf41e47fe Merge "new SystemAPI to getSimLocale" 2019-01-29 00:21:49 +00:00
Jack Yu
b551d0d6d3 Merge "Data profile refactoring" 2019-01-28 21:29:27 +00:00
sqian
4fd607e32e Add Emergency Number Test Mode
Add EMERGENCY_NUMBER_SOURCE_TEST_MODE

This also does not allow to send the service categories from database when
dialing.

Bug: 122840137
Test: Manual; Treehugger
Merged-in: I4ea3539e3b814b71e03e956d4a857ec20141fa8c
Change-Id: I4ea3539e3b814b71e03e956d4a857ec20141fa8c
(cherry picked from commit cb4bd3a30f)
2019-01-28 10:58:45 -08:00
Jack Yu
7d675e5a44 Data profile refactoring
Data profile should use the public defined types
instead of the internal defined data types.

1. Using integer instead of string for protocol type.
2. Using TelephonyManager.NetworkTypeBitMask instead of
   the internal ServiceState.RIL_RADIO_TECHNOLOGY_XXX
   in data profile.

Test: Telephony sanity tests
Bug: 73659459
Merged-In: I04b910f8e349e8b7819ff058bf37ad06c3fd9adc
Change-Id: I04b910f8e349e8b7819ff058bf37ad06c3fd9adc
(cherry picked from commit af6b47af54)
2019-01-28 10:32:23 -08:00
Brad Ebinger
5a8bb0a7f2 Add new ImsException to better handle ImsService errors
The ImsService can crash unexpectantly or not be available
for certain device configurations. Define a checked exception
ImsException to handle these cases instead of using
RuntimeExceptions.

Bug: 122480210
Test: atest FrameworksTelephonyTests
Merged-In: Ie3221d56a235c0e037d71e197f4972df31faa09b
Change-Id: Ie3221d56a235c0e037d71e197f4972df31faa09b
2019-01-26 00:02:42 +00:00
Brad Ebinger
3fc958475b Merge changes from topics "ut_provision_api", "ims_prov_api_defs"
* changes:
  Add new UT provisioning CarrierConfig options
  Define a subset of provisioning integers as public
2019-01-24 18:09:14 +00:00
Brad Ebinger
b3f4632fb0 Add new UT provisioning CarrierConfig options
Adds two new carrier config options for UT:
1) Whether or not the carrier supports UT over IMS
2) Whether or not the carrier requires a carrier app to
provision the device to use UT over IMS.

Also adds new ITelephony AIDL for querying/setting
provisioning for MMTEL currently used for UT over
IMS only.

Bug: 119896853
Test: atest FrameworksTelephonyTests
Change-Id: I51260afed85b99cf6ed89374daf417c3a25c7fb9
2019-01-23 16:50:49 -08:00
Brad Ebinger
ad9aec3522 Define a subset of provisioning integers as public
There are a few non-OMADM specific configs that need to
be exposed in ProvisioningManager to handle cases
like turning on WFC "non-persistently" for provisioning
on certain networks. These should be well defined for
compatibility as well as ease of use.

Test: atest FrameworksTelephonyTests, turn on WFC
Change-Id: I79c9492664d4bf41b10639c0596d4f2697cd46f2
2019-01-23 16:16:40 -08:00
Vasu Nori
aea0391cf6 Implementation of Remote-SIM.
Design doc http://shortn/_GG690j15js

1. Modified SmsManager to send message thru Bluetooth if the subscription
   is for a Remote-SIM.
2. Added new column 'subscriptionType' to SubscriptionInfo.
3. SubscriptionManager:
  a. Added new constants for Local SIM and Remote SIM
  b. Added hidden APIs to add/remove Remote SIM subscriptions

Bug: 112321331
Test: tested manually and w/ unittests
Change-Id: Ib15553a806691a258fc00f7aaf812b8a9d49c2e9
2019-01-23 14:25:32 -08:00
chen xu
61aa8cd949 new SystemAPI to getSimLocale
1. expose to system API
2. refactor to support passing subId instead of read from defaultSIM and
previously inserted SIM.

Bug: 122620985
Test: cts
Merged-In: I8f78ba00abf0ef74bd2b2147755596edaee156cf
Change-Id: I8f78ba00abf0ef74bd2b2147755596edaee156cf
2019-01-23 14:25:22 -08:00
Xiangyu/Malcolm Chen
8df9d17289 Merge "Add System API to enable / disable a logical modem." 2019-01-23 05:40:04 +00:00
Malcolm Chen
1a5de86744 Add System API to enable / disable a logical modem.
Bug: 122926141
Test: unittest
Change-Id: Ifeb3b135ba9ecba8982a911f369fa266468d2e45
Merged-In: Ifeb3b135ba9ecba8982a911f369fa266468d2e45
2019-01-21 13:43:18 -08:00
Malcolm Chen
4616e52aef Connect IRadioConfig 1.1 HAL interfaces with RadioConfig.java
IRadioConfig 1.1 getPhoneCapability and setPreferredDataModem
are defined. Here we hook the calls into RadioConfig.

Bug: 121354686
Test: sanity
Change-Id: I2a198d446962510ef9a3019d3aa30b40e796ebe0
Merged-In: I2a198d446962510ef9a3019d3aa30b40e796ebe0
2019-01-21 13:07:41 -08:00
Treehugger Robot
cd4ca49b18 Merge "Trigger PhoneStateListener onCallAttributesChanged" 2019-01-19 06:49:09 +00:00
Michele Berionne
98391daa29 Merge "Carrier restriction enhancements for Android Q" 2019-01-19 00:13:56 +00:00
Jayachandran C
8ef41bf34f Cellular data stall recovery based on networkStatus
This CL introduces cellular data stall recovery based on
network validation result. It still re-uses the existing
recovery steps but the triggers are based on networkStatus
from NetworkMonitor when the network is bad. Each recovery
step is spaced by a configurable grace period (default 3 mins)
to avoid back to back recovery.

This feature is controlled by the following settings. If this
feature is enabled then the legacy data stall detection based
on TrafficStats will automatically be disabled.

Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK
1 => Enabled (default)
0 => Disabled

Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS
3 minutes is default value

Bug: 113916551
Test: atest FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DcTrackerTest

Change-Id: I738fc7ed08803de1114f7a3d79bf278449e94ea8
2019-01-18 22:52:16 +00:00
Michele Berionne
a4a1ae499d Carrier restriction enhancements for Android Q
Add support for dual SIM to carrier restrictions.
Add support to exclude specific carriers in the list of carrier
restrictions.

Bug: 120313541
Test: Created test application to verify correct functionality.
Test: Added test cases for CarrierRestrictionRules.
Change-Id: I2723fb07db13efdafbc74471a87182e2d2a32718
Merged-In: I2723fb07db13efdafbc74471a87182e2d2a32718
2019-01-18 22:37:12 +00:00
Jack Yu
56401a4c74 Merge "Split applyNewState into enable/disable APN" 2019-01-18 09:07:16 +00:00
Jack Yu
4810387d02 Split applyNewState into enable/disable APN
This is the preliminary work for adding handover
type for enable/disable APN.

Test: Telephony sanity tests + unit tests
Bug: 73659459

Merged-In: I51fd01d798cdf8d04fd41455126d017ac97f5f3f
Change-Id: I51fd01d798cdf8d04fd41455126d017ac97f5f3f
(cherry picked from commit ade6d1a66d)
2019-01-17 16:45:14 -08:00
chen xu
61fbefbbe9 Update sharedPreference to false when exits new device provisioning
Update sharedPreference to false when exits new device provisioning,
indicating no users modifications on the settings for new devices.
Thus carrier specific default roaming settings can be applied for new devices.

Bug: 122817867
Test: Manual test on VZW SIM in Setupwizard
Merged-in: Ic93b16f9f96ccc98d12f46c79ab1008ae0df8a07
Change-Id: Ic93b16f9f96ccc98d12f46c79ab1008ae0df8a07
2019-01-18 00:44:21 +00:00
Gnaneshwar Gatla
cd816ab446 uce: Updating UCE API to accept ICC-ID.
Test: Manual

Bug: 37437947

Change-Id: Idbf081f885f4f8c1b5dd7ac87893bd3bd08e12b0
2019-01-16 19:15:44 -08:00
Jordan Liu
8218ddd963 Trigger PhoneStateListener onCallAttributesChanged
onCallAttributesChanged can trigger whenever the PreciseCallState or
network type changes, or when the modem reports call quality changes.

Bug: 122366240
Test: builds
Change-Id: I9b13cbdd85c24c077e1a13df302bf60128c164e9
2019-01-16 15:13:12 -08:00
Jordan Liu
17715735ed EuiccManager handles multiple eUICCs using cardId
Bug: 80097562
Test: manual
Change-Id: I61ab60dfe4b97080148c9ee4b180e0a582b10f59
Merged-In: I61ab60dfe4b97080148c9ee4b180e0a582b10f59
2019-01-15 16:13:32 -08:00
Xiangyu/Malcolm Chen
609ed3380f Merge "Make setMetered and setOpportunistic public." 2019-01-15 23:31:34 +00:00
Holly Jiuyu Sun
81801283e3 Merge "Allow privileged carrier app to update subscription nickname." 2019-01-15 22:09:10 +00:00
Nazanin Bakhshi
396e01a168 Merge "add getPreferredDataSubId to SubscriptionManager and rename setPreferredData -> serPreferredDataSubId" 2019-01-15 17:25:31 +00:00
Pengquan Meng
3c0efa4e0a Merge "cherry-picked "Add multiple esim support for SubscriptionManager"" 2019-01-15 04:40:07 +00:00
Nazanin Bakhshi
e0215a7026 add getPreferredDataSubId to SubscriptionManager
and rename setPreferredData -> serPreferredDataSubId

Bug: 117833883
Test: sanity
Change-Id: I67b18f1ef450c3d9e5615b3d2ec8a53a0691d7af
Merged-In: I67b18f1ef450c3d9e5615b3d2ec8a53a0691d7af
2019-01-14 18:00:40 -08:00
Holly Jiuyu Sun
997a88853b Merge "Support profile policy rule as a resolvable error." 2019-01-14 23:35:56 +00:00
Malcolm Chen
d4dc4ee269 Make setMetered and setOpportunistic public.
Making SubscriptionManager#setMetered and #setOpportunistic public
APIs. Adding proper permission checks and descriptions.

Bug: 120138251
Test: cts, unittest

Change-Id: Id6f074b15a1c03d00ede2665d44595fa7be965e4
Merged-In: Id6f074b15a1c03d00ede2665d44595fa7be965e4
2019-01-14 13:52:32 -08:00
Pengquan Meng
eb7ac7396a cherry-picked "Add multiple esim support for SubscriptionManager"
Bug: 112902036
Test: atest FrameworksTelephonyTests
Merged-In: Iea25c78e4f9c0b1e16add5f796b293e7ace08c67
Change-Id: Iea25c78e4f9c0b1e16add5f796b293e7ace08c67
2019-01-14 13:45:58 -08:00
Hall Liu
7ae295368d Merge "IMS: Propagate media profile changed message" 2019-01-14 21:28:28 +00:00
Holly Jiuyu Sun
a74079a242 Allow privileged carrier app to update subscription nickname.
Make EuiccManager#updateSubscriptionNickname as public API to allow
carrier app to call it.
Only a privileged app of the given subscription can update the
subscription nickname.
Refresh cached subscription list after the nickname is successfully
updated.

Bug: 122597547
Test: test on phone
Change-Id: I63c5ec4366f32735a54adf40b9cc0b47af681736
Merged-In: I63c5ec4366f32735a54adf40b9cc0b47af681736
2019-01-14 13:22:02 -08:00
Jordan Liu
7bc14fcc38 Merge "Add CallAttributes and PhoneStateListener method" 2019-01-14 18:45:12 +00:00
Sooraj Sasindran
c78240df19 Merge "Rename ANS to ONS" 2019-01-12 19:11:53 +00:00