Commit Graph

3323 Commits

Author SHA1 Message Date
Xin Li
f90d07b1b3 Merge "DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master" into stage-aosp-master 2019-02-23 00:39:16 +00:00
Michele Berionne
862821ede5 Merge "Add checks on multisim capabilities." 2019-02-22 01:18:41 +00:00
Xin Li
b455c3a7f3 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08:00
Michele
c5e6e54a20 Add checks on multisim capabilities.
Rename method isMultisimCarrierRestricted to isMultisimSupported to
indicate extended scope that includes checks on the capabilities of the
hardware to support multi-SIM configuration.

Bug: 123537730
Test: Compilation, test application
Change-Id: I20860c7a25b054b8312c144544726337e09559e2
Merged-In: I20860c7a25b054b8312c144544726337e09559e2
2019-02-21 21:28:08 +00:00
Nathan Harold
a6dda25ac9 Merge "Expose the Radio HAL Version for Test Purposes" 2019-02-20 17:50:41 +00:00
Xiangyu/Malcolm Chen
f2cf09c945 Merge "Adding validate before switch feature." 2019-02-20 05:25:00 +00:00
Malcolm Chen
d78dac0bd1 Adding validate before switch feature.
In CBRS DSDS mode, switching data to CBRS network will require
validation first. Adding a component of CellularNetworkValidator
to trigger the validation and pass the result back to PhoneSwitcher.

Bug: 118348832
Test: manual
Change-Id: I689aa494f031834b5cee76906922ebdafa9c77ed
Merged-In: I689aa494f031834b5cee76906922ebdafa9c77ed
2019-02-20 02:52:14 +00:00
Malcolm Chen
1a1689a32c Move getPhoneCount implementation back to TelephonyManager.
Moving it inside iTelephony creates problems. Some components call
getPhoneCount during initialization while iTelephony service is not
even running, which will cause phone process to crash.

Bug: 123667461
Test: manual
Change-Id: I51199eaf0bd87055c21fe61af50f4c353137d621
Merged-In: I51199eaf0bd87055c21fe61af50f4c353137d621
2019-02-20 00:49:58 +00:00
Nathan Harold
69e0ed19e1 Expose the Radio HAL Version for Test Purposes
To properly check that values are being populated by
devices supporting newer HALs, it is necessary to
avoid enforcement on devices using older HAL versions.
Exposing the HAL version for test purposes allows that.

Bug: 122834594
Test: compilation
Change-Id: Idadc2fc8dd4f7b4765af90d92b62eea3e017a843
2019-02-15 09:56:00 -08:00
Brad Ebinger
ca2abcf735 Merge "SMS: Add a compatible API getRecipientAddress for 3GPP2 SMS" 2019-02-14 23:40:44 +00:00
Hall Liu
a3aae9fe4b Merge "Implement more location checks" 2019-02-13 23:21:43 +00:00
Hall Liu
ee313737e9 Implement more location checks
Make the following modifications to APIs and required permissions.
Move the following APIs from checking coarse permission to fine
permission (except for apps targeting pre-Q):
TelephonyManager.getCellLocation()
(deprecated) TelephonyManager.getNeighboringCellInfo()
TelephonyManager.getAllCellInfo()
TelephonyManager.requestCellInfoUpdate()
PhoneStateListener#onCellLocationChanged
PhoneStateListener#onCellInfoChanged

Start checking for fine permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager.requestNetworkScan()
TelephonyScanManager.requestNetworkScan()
NetworkScanCallback#onResults

Start checking for coarse permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager#getAvailableNetworks
TelephonyManager#getServiceStateForSubscriber and #getServiceState
PhoneStateListener#onServiceStateChanged

Bug: 116258458
Test: manual via testapps
Change-Id: I45326ddacbcf538da50ca544d67eed12cf0c0861
2019-02-13 11:07:37 -08:00
Mengjun Leng
43c7335deb SMS: Add a compatible API getRecipientAddress for 3GPP2 SMS
The method getDisplayOriginatingAddress() return null for submit
pdu of 3GPP, it will cause applicatoin can not get address of sent
message. Thread ID is unable to be created for this invalid message
record.

Add an API getRecipientAddress() for SubmitPdu in SmsMessage.

Bug: 73012819
Change-Id: Ib3e98ad3f115038656db1ea7ff5b05491b28b85d
2019-02-12 19:54:05 -08:00
Pengquan Meng
0c44939a95 Add getSlotsMapping to TelephonyManager
Bug: 123101769
Test: build
Merged-In: I416d741947b1a15e66ebf71b8104c4b2ec95e310
Change-Id: I416d741947b1a15e66ebf71b8104c4b2ec95e310
(cherry picked from commit 83e7b920de)
2019-02-12 16:24:22 -08:00
Brad Ebinger
76bc8cf927 Merge "Telephony: Add 7bit Ascii support for long message" 2019-02-12 23:55:32 +00:00
Nazanin Bakhshi
55faf37439 Merge "Make isRebootRequiredForModemConfigChange SystemApi" 2019-02-12 00:37:43 +00:00
Nazanin Bakhshi
0e3e93a07c Make isRebootRequiredForModemConfigChange SystemApi
Bug: 124074656
Test: build
Change-Id: I32c6b0786d32b05d690cea862e977e6a2b756c90
2019-02-11 10:37:45 -08:00
Malcolm Chen
77b2b559e1 Add API to handle user's subscription selection changes.
When user selects a eSIM subscription, Settings app informs Telephony.
Telephony needs to take actions such as writting it into global
settings, switch profiles and notify registrants, for example
AlternativeNetworkAccessService.

Bug: 120945564
Test: unittest
Change-Id: I846d9444aac368d183e06744c9eb8aa0c08dfe6a
Merged-In: I846d9444aac368d183e06744c9eb8aa0c08dfe6a
2019-02-07 17:42:34 -08:00
Amit Mahajan
f552341204 Merge "Avoid NPE caused by null encodedBearerData in privateGetSubmitPdu" 2019-02-07 01:31:18 +00:00
Amit Mahajan
74a0dd8092 Merge "Use correct PLMN info for an incoming CB-SMS" 2019-02-07 01:30:09 +00:00
Sukanya Rajkhowa
0f697a5647 Telephony: Add 7bit Ascii support for long message
Add 7bit Ascii encoding and decoding support for long messages

Bug: 37289589
Test: atest FrameworksTelephonyTests

Merged-In: I7c2cd91d0aef0d6436d250544db9bf2131e35075
Change-Id: I7c2cd91d0aef0d6436d250544db9bf2131e35075
2019-02-06 17:44:22 +00:00
Sahin Caliskan
f00a876893 Implementation of RcsMessageStore APIs [base]
This change adds the implementation of RcsMessageStore. Please see the
bug for the design and one-pager

Test: Added unit tests

Bug: 109759350
Change-Id: I6049dcf74ef9e19a38ce58148a89497992bc1c98
2019-02-06 15:49:16 +00:00
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
Taesu Lee
c692ce761b Avoid NPE caused by null encodedBearerData in privateGetSubmitPdu
Just return without HexDump to avoid NPE.

Test: Manual

Change-Id: Ide705518be4e9d6391ae0b844d681ac9a1a97233
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-02-01 18:45:11 +09: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
Taesu Lee
a2b94d7898 Use correct PLMN info for an incoming CB-SMS
Create SmsCbMessage for an incoming CDMA CB-SMS with PLMN info
associated with a phone in multi-SIM.

Test: Manual
      run atest FrameworksTelephonyTests:CdmaSmsCbTest

Change-Id: Ic177e45e3ab3550e8c32ed9e2c74e64b85af34c4
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-01-29 13:03:29 +09: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