Commit Graph

8087 Commits

Author SHA1 Message Date
Malcolm Chen
dcc97e11b1 Mark two unfinished APIs as "DO NOT USE".
The two APIs at this point are not well defined and implemented due to
design changes after they were introduced. Marking them as DO NOT USE
until further re-define or clean up.

Test: build
Bug: 135222940
Change-Id: I3f06040fdda25c7aa27be45cd90177136f7e996f
Merged-In: I3f06040fdda25c7aa27be45cd90177136f7e996f
2019-07-11 17:04:19 -07:00
Nazanin Bakhshi
1ca89a995b Merge "Add device identifier permission checks to TelephonyPermissions" 2019-07-01 23:26:18 +00:00
Nazanin Bakhshi
cf5e620a19 Merge "Store subscriber ID / IMSI into telephony database" 2019-07-01 23:26:18 +00:00
Michael Groover
94672cea7c Add device identifier permission checks to TelephonyPermissions
Bug: 131916175
Fixes: 136305129
Test: atest PhoneSubInfoControllerTest
Change-Id: Icca98347ab76b7c3468b95756a33a758a3abde37
Merged-In: I3c82c53ec89cd17b34a61166ccc9e9747388efac
2019-07-01 17:53:11 +00:00
Nathan Harold
4d4e2474ea Merge "Revert "Use TM SubId in getDataState and getDataActivity"" 2019-06-27 22:11:18 +00:00
Nathan Harold
44173ee7b0 Revert "Use TM SubId in getDataState and getDataActivity"
This reverts commit b2ab846cf4.

Reason for revert: Decision has been made to keep the unsupported AIDL API.

Change-Id: I31219606974019ac46da789ec31ca9cb3a86eb13
2019-06-26 00:41:00 +00:00
Chen Xu
b6399511f8 Merge "move short code definitions to SmsManager Test API" 2019-06-25 17:18:46 +00:00
Neil Fuller
b8bdc72174 Merge "Migrate telephony code away from Time" 2019-06-25 08:48:17 +00:00
chen xu
0276e13b96 move short code definitions to SmsManager Test API
Bug: 127560420
Test: cts
Change-Id: I6a5ba2439713105b25913ba8eb081abfaafd1a2e
(cherry picked from commit 9c7fad9235)
Merged-in: I6a5ba2439713105b25913ba8eb081abfaafd1a2e
2019-06-24 21:12:48 +00:00
Steven Moreland
f961b9632f Merge "Remove obsolete reference to ServiceManagerNative." 2019-06-24 18:02:34 +00:00
Steven Moreland
bb25d1aeba Remove obsolete reference to ServiceManagerNative.
ServiceManagerNative.getDefault doesn't exist.

Bug: 135768100
Test: N/A
Change-Id: I6e04b54c986c3d0997429a8d810f2554d84dc119
2019-06-21 16:41:50 -07:00
Amit Mahajan
44ea78d8ff Merge "Set mOriginatingAddress and mRecipientAddress separately" 2019-06-21 23:23:12 +00:00
Amit Mahajan
3fdedfab76 Merge "Replace the IDD with the '+' sign" 2019-06-21 16:34:12 +00:00
Hunter Knepshield
49fa37256f Fix SubInfo#toString consistency.
MCC was previously running into the country ISO.

"... mnc 260mCountryIso=US ..."

Some fields had odd spacing/delimiters.

Test: compilation (trivial)
Change-Id: I217fbbdf3a2783e8b98ceecbf62e21482b58db37
2019-06-20 20:32:57 +00: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
Taesu Lee
da48fd8fc1 Set mOriginatingAddress and mRecipientAddress separately
Properly assign the address according to the parameters in the PDU for
3GPP2 SMS. mOriginatingAddress or mRecipientAddress should be used to
get the address according to the actual message type. And the destination
subaddress is added also.

Test: Manual

Change-Id: Ide734b7348ea5eb8cf460dac046e96609ed9d8b3
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-06-20 07:56:31 +09:00
Malcolm Chen
56ea64d703 Triggering notifications when dual CDMA SIM combinations are detected
Define dual CDMA SIM combination extras.

Bug: 132631355
Test: manual - have two cdma capable subscriptions active, make sure
the notification is sent, and tapping on it leads to the helper page.

Change-Id: I5caf39478dd0814aa1b2def801b1c3a107355682
Merged-In: I5caf39478dd0814aa1b2def801b1c3a107355682
2019-06-19 22:48:08 +00:00
Nazanin Bakhshi
1eaf7a8c02 Store subscriber ID / IMSI into telephony database
Bug: 131916175
Test: manual
Change-Id: I64cd12a6737b7ef7fb31b851c1cbb5b7f46e6ca7
Merged-In: I64cd12a6737b7ef7fb31b851c1cbb5b7f46e6ca7
(cherry picked from commit 6cf9e9df0e)
2019-06-19 18:15:12 +00:00
Nathan Harold
28a7b5974d Merge "Use TM SubId in getDataState and getDataActivity" 2019-06-18 17:44:15 +00:00
Jack Yu
30b14a9d70 Merge "Fixed incorrect merge service state" 2019-06-18 05:25:35 +00:00
Nathan Harold
b2ab846cf4 Use TM SubId in getDataState and getDataActivity
-Update getDataState() API to use the SubId specified
 by the TelephonyManager instance.

-Update the getDataActivity() API to use the SubId
 specified by the TelephonyManager instance.

Bug: 135205433
Test: manual (automated test is infeasible)
Change-Id: Icf27eab40b1f979892123dc4185db2a138c1ffc2
2019-06-17 18:29:09 -07:00
Jack Yu
807a82b3aa Fixed tethering failed when device is on CBRS
Fixed by using the correct sub id for CBRS subscription

Bug: 133852860
Test: Manual
Merged-In: If01e17becce9684556345eb76512f617b9a9278c
Change-Id: If01e17becce9684556345eb76512f617b9a9278c
(cherry picked from commit a952d2018b)
2019-06-17 18:29:09 -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
Hunter Knepshield
286ca032c2 do not print phone number which is considered as pii
do not print phonenumber in subscriptionInfo

Bug: 133191331
Change-Id: Ibdc4689f41a8dac162b617d6972bb72b3dd86e4e
Merged-In: Ibdc4689f41a8dac162b617d6972bb72b3dd86e4e
2019-06-17 14:19:46 -07:00
Neil Fuller
c18b91b35e Migrate telephony code away from Time
Switch telephony code under frameworks/base/ away from
android.text.format.Time. Time uses 32-bit ints to represent
seconds from the start of the Unix epoch and therefore will
break in 2038. Moving to java.time types avoids this problem.

Bug: 16550209
Test: build / boot / treehugger
Change-Id: I49e748f686709c0c38aa5ba37b37ec4ed1e68b55
2019-06-17 20:19:14 +01:00
Treehugger Robot
94deb1ca38 Merge "Assume successful delivery if no Message Status" 2019-06-13 23:32:09 +00:00
Amit Mahajan
15fbc62662 Avoid UnsupportedOperationException from getDefaultSmsSubscriptionId()
This is basically reverting to earlier behavior.

Test: basic sanity
Bug: 134375393
Merged-in: I44dc66f9f3d5d4dfcab95220d7a6a6be0ed5a825
Change-Id: I44dc66f9f3d5d4dfcab95220d7a6a6be0ed5a825
(cherry picked from commit 900aad9924)
2019-06-13 14:31:19 -07:00
Amit Mahajan
2bc637ecb9 Fix the default sub id returned by SmsManager.
SmsManager.getDefaultSmsSubscriptionId() did not handle the case
of no default set with a single SIM present. This CL adds the
handling for that.

Test: manual SMS sanity on single sim and DSDS devices
Bug: 132259056
Merged-in: I72ee7af9f0b2662e1ac26b7d3db60c667d06c471
Change-Id: I72ee7af9f0b2662e1ac26b7d3db60c667d06c471
(cherry picked from commit 1c0a7a16c1)
2019-06-13 14:30:40 -07:00
Brad Ebinger
05f4ff0a95 Trampoline SMS disambig dialog to Telephony
SmsManager used to display a "select default SMS
subscription" dialog every time SmsManager was used
and no default SMS subscription was set. This change
fixes the following issues:
1_ getSubscriptionId no longer pops up a disambig
dialog.
2) The disambig dialog no longer sets the
default, rather it waits for the response from the
user and performs the operation when it receives
a response.
2a) Dialogs can no longer be created from background
services, so we now have a restriction that if
the disambig dialog is shown via a background service,
we will use phone 0 as default (backwards compat for
apps targeting <Q) or fail (on apps targeting Q+).
3) If there is only one active subscription, use that
to perform the operation on MSIM devices instead of
asking and only displaying the one active subscription.
4) Certain non "user-facing" APIs that are used by
carrier apps no longer will pop up a UI.

Bug: 131713446
Bug: 130853716
Bug: 129141025

Test: run SmsManagerTestApp; atest TelephonyFrameworksTests

Merged-In: Ibbc07c961f1bdc19e1015885487e9f7b6a14fa83
Change-Id: I6be1c6d7bf6b6ee614b6a7d0369147e3b1890588
2019-06-13 18:30:14 +00:00
Brad Ebinger
26b242f75e No longer show disambig when calling SmsManager#getSubId
SmsManager#getSubId used to show a disambig dialog to
pick a default SMS subscription when
SmsManager#getSubscriptionId was called. Since it was used
internally as well, it would cause many of these dialogs
to pop up over and over again.

Do not display the dialog anymore and instead move the
dialog pop up to the methods that actually require the use
of the dialog, such as sending a text.

Bug: 130853716
Test: Manual, Default SMS app
Merged-In: Ibbc07c961f1bdc19e1015885487e9f7b6a14fa83
Change-Id: I71ad38f76750c750b149e4cdcb6fcf99ed89212e
2019-06-13 18:29:59 +00:00
Taesu Lee
f018547425 Assume successful delivery if no Message Status
It assumes ERROR_CLASS is ERROR_NONE and MSG_STATUS_CODE is
STATUS_DELIVERED if there is no Message Status subparameter in Delivery
Acknowledgment.

Test: Manual

Change-Id: If5660235ce2a6af84d03ec1367a8be5daee672d2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-06-13 12:53:13 +09:00
Treehugger Robot
8402337237 Merge "Add workaround for b/124210145" 2019-06-11 03:25:45 +00:00
Jack Yu
a726a48fcd Supported data enabled override for different scenarios
Added override rules support for always allowing mms and
internet data during voice call.

Test: Manual + unit tests
Bug: 132113695
Merged-In: I2266d7f428901ccbba6bf538a7c7696e6566b96c
Change-Id: I2266d7f428901ccbba6bf538a7c7696e6566b96c
(cherry picked from commit 0d26d718b3)
2019-06-07 14:47:13 -07:00
Jack Yu
7145807316 Merge "Extend the service configuration for the binding service." 2019-06-06 17:51:54 +00:00
sqian
b46b589fc8 Add "+" in EmergencyNumber API
Bug: 133244926
Test: Treehugger
Change-Id: I09b0127ce929ec51fbb5c387c383e76dcde5f0b5
Merged-In: I09b0127ce929ec51fbb5c387c383e76dcde5f0b5
(cherry picked from commit 82cfdba17a)
2019-06-05 12:12:54 -07:00
chen xu
459e51e5ba skip permission check for TelephonyManager API getMmsUserAgent
Bug: 133637995
Test: Manual test
Change-Id: Ib9f211120c34e9b48c02f990088c32fb307a64f2
(cherry picked from commit 4878165365)
Merged-in: Ib9f211120c34e9b48c02f990088c32fb307a64f2
2019-06-04 18:13:32 +00:00
Chen Xu
cdbb700fa3 Merge "Get the resources associated with subid to support MSIM" 2019-06-04 06:34:16 +00:00
calvinpan
6f51e9624f Get the resources associated with subid to support MSIM
To avoid AP get the incorrect mms_user_agent and mms_user_agent_profile_url
in the MSIM device, so get the resource with subscription.

Bug: 131296413
Test: Build pass
Merged-In: Ib00cfe3640b59db5f971c32741eed999131e67c0
Change-Id: Ib00cfe3640b59db5f971c32741eed999131e67c0
(cherry picked from commit ea6d2b1e1e)
2019-06-03 19:51:21 -07:00
Brad Ebinger
541f01b1bc Merge "Fix parcelling issue for certain fields." 2019-06-03 22:54:35 +00:00
Youming Ye
93931ccb81 Merge "Add carrier config for conference participants data support" 2019-06-03 21:09:49 +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
Evan Tyra
9bd937a0f6 Catch NPE in getServiceStateForSubscriber
ITelephony can enter a bad state with an incorrect SubId and throw an
NPE as shown in the attached bug. This is not an expected error, so a
bugreport will be triggered on userdebug builds on catch.

Test: Local
Bug: 134067547
2019-06-01 00:02:42 +00:00
Youming Ye
37ca693d78 Add carrier config for conference participants data support
Bug: 132312382
Test: Manual
Change-Id: I88edd5a590f46b961c986ef0bf24585b3c2cf4a1
2019-05-30 14:13:44 -07:00
Jiyong Park
d7d472adad Add workaround for b/124210145
Problem description:
Metalava emits signature of a method under a class, even when the method
is not defined in the class when the method is inherited from a hidden
ancestor and the method is part of the public interface that the class
is expected to implement.

To be specific, inside the api signature, MmbmsDownloadServiceBase has
asBinder() and onTransact(). The methods are not defined in the class
but inherited from the auto-generated hidden class
IMbmsDownloadService.Stub. However, since the methods are also declared
in the public ancestors of the class, e.g., Binder and IInterface,
the methods are force-included in the class. Omitting the methods will
cause problem when building the stub version of the class.

This inclusion of the inherited method is breaking
SystemApiAnnotationTest. That's because the test ensures that a symbol
listed in the API signature file for the System API is actually
annotated with @SystemApi.

Solution:
To workaround the issue, actually implement the auto-generated methods
inside the class and annotate them.

Bug: 124210145
Test: atest CtsSystemApiAnnotationTestCases
Merged-In: I6760f6e4068239361c495ae7c0de3e25f91d38e1
Change-Id: I6760f6e4068239361c495ae7c0de3e25f91d38e1
(cherry picked from commit 6651eb2142)
2019-05-31 01:55:31 +09:00
Treehugger Robot
d47ae01063 Merge "Deprecate getNetworkType" 2019-05-27 21:10:50 +00:00
Treehugger Robot
0c7239996d Merge "Add permissions check for getNetworkType" 2019-05-27 19:04:39 +00:00
Yatai Lin
6ed1ada870 Extend the service configuration for the binding service.
Add resource string and carrier config for class name to
specify data service, network service and qualified
network service.

Bug: 130262388
Test: Adding IWLAN data service, IWLAN network service
and use new configuration to bind the service.

Change-Id: I7ddde5d868d02753344734684b0deb2727bdd67e
2019-05-27 15:18:09 +08:00
Hall Liu
d99ca07884 Merge "Stop silently dropping a NullPointerException" 2019-05-24 18:27:44 +00:00
Taesu Lee
ee503e4c07 Replace the IDD with the '+' sign
It replaces the IDD in front of an address in 3GPP2 message with the '+'
to show as an international phone number format.

Test: Manual

Change-Id: I450b514bfd5d638ca886d8b64a6db45526f13fbf
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-05-24 11:13:21 +09:00
Nathan Harold
7293d28543 Deprecate getNetworkType
This API is a functional duplicate of getDataNetworkType.

Bug: 132466954
Test: make update-api (docstring-only change)
Change-Id: I3a5ba3d601013bc9c97c6ea1732bfac21fce0dcd
2019-05-22 13:57:42 -07:00