Commit Graph

3318 Commits

Author SHA1 Message Date
Malcolm Chen
9ac7e52a93 Don't return hidden subscription in getActiveSubIdList
Now getActiveSubscriptionInfoList will not return hidden
subscriptions. And getActiveSubIdList should be consistent
with it. In the mean time, internal SubscriptionController
API should have a way to specify if caller wants hidden
subscriptions or not.

Bug: 124690005
Test: manual
Change-Id: I46ccae88167c2988d71a6e07da2937bf9644a1f0
Merged-In: I46ccae88167c2988d71a6e07da2937bf9644a1f0
2019-03-12 14:09:33 -07:00
Daniel Huang
f96cc08066 Merge "Modify API return type and add callback." 2019-03-12 06:02:04 +00:00
danielwbhuang
a335880efe Modify API return type and add callback.
1. Modify the type from boolean to void for updateAvailableNetworks().
2. Adding callback for updateAvailableNetworks().
3. Define error codes for update available networks results.

Test: build pass
Bug: 124616182
Merged-In: I32fe1407deabe36485227ec75931bec334d85abe
Change-Id: I32fe1407deabe36485227ec75931bec334d85abe
2019-03-11 20:02:16 +08:00
chen xu
2b0139ca18 rename precise carrier id to specific carrier id
Bug: 126727010
Test: atest CtsTelephonyTestCases

Change-Id: I4561ae8c15c429912695e0753b2ab3137a4e1e44
(cherry picked from commit 45f6621391)
Merged-in: I4561ae8c15c429912695e0753b2ab3137a4e1e44
2019-03-10 01:06:33 -08:00
Nazanin Bakhshi
016409b3d5 Merge "Rename PREFERRED_DATA_SUBID_CHANGE to ACTIVE_DATA_SUB_CHANGE" 2019-03-08 18:25:59 +00:00
Xiangyu/Malcolm Chen
442084c722 Merge "Adding callback for setPreferredDataSubscriptionId." 2019-03-07 22:47:31 +00:00
Malcolm Chen
db859e7ece Rename PREFERRED_DATA_SUBID_CHANGE to ACTIVE_DATA_SUB_CHANGE
Redefine a PhoneStateListener event so that it reflects which
subscription is currently being used for Internet data. It could
be default user data subscription or currently active opportunistic
subscription.

Bug: 124260187
Test: unittest
Change-Id: Icb90b5bd93845c29157cafddcd53335728638ec2
Merged-In: Icb90b5bd93845c29157cafddcd53335728638ec2
2019-03-07 19:20:47 +00:00
Malcolm Chen
fd11df2924 Adding callback for setPreferredDataSubscriptionId.
The purpose is to provide a way to return success or failure upon
switching data to CBRS subscription.
The same callback is used for ONS to call internal API. Later it
will also be used by Carrier apps to call TelephonyManager#
setPreferredOpportunisticDataSubscription.

Bug: 122255288
Test: manual

Change-Id: Id3f43e024c902d6785017e7866f9e804a486b04f
Merged-In: Id3f43e024c902d6785017e7866f9e804a486b04f
2019-03-06 14:54:41 -08:00
Andrei-Valentin Onea
842e3aa420 Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 17:19:05 +00:00
Andrei-Valentin Onea
8cbc2e9ad1 Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 17:17:27 +00:00
Nazanin Bakhshi
5c9e3523f0 create getModemEnabled function in PhoneConfigurationManager
Bug: 124402911
Test: build
Change-Id: I7b22c5b0dbe95a8e5be2e0cbf3199841d275dac7
Merged-In: I7b22c5b0dbe95a8e5be2e0cbf3199841d275dac7
(cherry picked from commit 24183ad67acd9fcf3917bd56484212740578f36c)
2019-03-04 12:06:15 -08:00
Amit Mahajan
36791ef41e Merge "Adding new APN type for Mission Critical Services." 2019-03-04 18:23:30 +00:00
Mark Chien
077a04828d Merge "Change return value of getTetherApnRequired() to a boolean." 2019-03-03 06:53:47 +00:00
Amit Mahajan
fd3ee5783e Adding new APN type for Mission Critical Services.
Test: build
Bug: 124447962
Change-Id: I9f608badd363703394432640dc892a4465660b6d
2019-03-01 16:52:17 -08:00
Brad Ebinger
66cee391c3 Fix ImsMmTelManager API in accordance with the council
Bug: 121190195
Test: atest FrameworksTelephonyTests
Merged-In: I5d011e1875c082a4532747e30e8582ff3da4ee93
Change-Id: I5d011e1875c082a4532747e30e8582ff3da4ee93
2019-02-28 11:25:13 -08:00
Andrei Onea
cf1a82953b Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.appwidget
  com.android.internal.location
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony
  com.android.internal.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I6eba34467b2492047e5264684312adfa029eb317
Change-Id: I413c4b6dd12bcf40b69423718ed278cbefe82087
2019-02-28 17:01:29 +00:00
Andrei Onea
5ac62403d4 Add @UnsupportedAppUsage annotations
For packages:
  com.android.ims
  com.android.ims.internal
  com.android.ims.internal.uce.options
  com.android.ims.internal.uce.presence
  com.android.ims.internal.uce.uceservice

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I13583455e85c78cfca5f4d67e4b982b58178104e
Change-Id: I448267cfb48838115b1fa1b88a1d167aab81ce4e
2019-02-28 14:29:13 +00:00
Jordan Liu
0a04598a39 Merge "CallAttributes uses the call network type" 2019-02-25 21:49:11 +00:00
Michele Berionne
862821ede5 Merge "Add checks on multisim capabilities." 2019-02-22 01:18:41 +00:00
Jordan Liu
65ed9d9227 CallAttributes uses the call network type
Instead of the ServiceState.getNetworkType(), since the service state
might not match the RAT of the specific call, we use the radio type from
the ImsCall.

Bug: 124785734
Test: manual
Change-Id: I33f84bb415c943d5b766fcd3a4e8257d8f7c1cfe
2019-02-21 15:52:36 -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