Commit Graph

3783 Commits

Author SHA1 Message Date
Ritwika Mitra
e46b018ed5 Merge "Initializing the Telephony Sms DB based on RoleManager.ROLE_SMS" into qt-dev
am: d1ca4823d5

Change-Id: I9191b12012caa00375f236c9cef086ac67c84b0d
2019-06-03 12:35:56 -07:00
Ritwika Mitra
19afd4690f Initializing the Telephony Sms DB based on RoleManager.ROLE_SMS
Fix: 133356079
Test: manual

Change-Id: I49dcdc450e1113ffae887ad488d39f74a96787ed
2019-06-03 10:42:43 -07:00
Nazanin Bakhshi
2822c25b89 Merge "Supported data enabled override for different scenarios" into qt-dev
am: 02e9e32b90

Change-Id: Ibf541df3b68f476257f79ff458b55edf0efba9db
2019-05-31 17:27:12 -07:00
Jack Yu
0d26d718b3 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
Change-Id: I2266d7f428901ccbba6bf538a7c7696e6566b96c
2019-05-31 11:06:15 -07:00
Chen Xu
7e5fa37b11 Merge "skip permission check for TelephonyManager API getMmsUserAgent" into qt-dev
am: 924c6eb536

Change-Id: Ibb34ee3980b10e5791c0239676d03c3b4304dfd8
2019-05-28 21:32:43 -07:00
chen xu
4878165365 skip permission check for TelephonyManager API getMmsUserAgent
Bug: 133637995
Test: Manual test
Change-Id: Ib9f211120c34e9b48c02f990088c32fb307a64f2
2019-05-28 15:38:54 -07:00
Amit Mahajan
3aa54b1fff Merge changes from topic "Correct subId in divideMessage()" into qt-dev
* changes:
  Fix the default sub id returned by SmsManager.
  Divide a message text into correctly sized parts
2019-05-23 16:42:19 +00:00
Nathan Harold
be113ab4aa Merge "Add permissions check for getNetworkType" into qt-dev
am: ecd1e039a3

Change-Id: I2bd909b7cf20c93047007fbce05f32049f5214b3
2019-05-22 19:32:35 -07:00
Amit Mahajan
2113c335ae Merge "Add comments for boolean parameters in translate()." am: a844340276
am: b404dada78

Change-Id: Ica548474dbb5ae9d70b8511f82273b8f9eab5349
2019-05-22 01:33:14 -07:00
Amit Mahajan
dd4b36a12c Add comments for boolean parameters in translate().
Test: none
Bug: 132259056
Change-Id: Ia57d8a81a980959ea1f79692501edd88a8bab273
2019-05-21 17:32:45 -07:00
Nathan Harold
39444b39ba Add permissions check for getNetworkType
-Add a function in TelephonyPermissions to check
 READ_PHONE_STATE or return NETWORK_TYPE_UNKNOWN (soft denial).
-Honor the subId in TM or use the default DATA sub when
 returning the network type.

Bug: 132466954
Test: cts - atest TelephonyManagerPermissionTest
Change-Id: I4e1767c9dc10acbadec286512752d4bb52059b74
2019-05-21 16:50:00 -07:00
Taesu Lee
98d41e6917 Divide a message text into correctly sized parts
Message format info is required in order to divide a message text into
correctly sized parts on a device that supports for both 3GPP and 3GPP2
formats in multi-sim. And fixed to get default SMS subId from SmsManager
in SmsMessage class instead.

Test: Manual
Bug: 132259056
Merged-in: Id2512eb62504b7e789f58b7d9697009d565c4a18
Change-Id: Id2512eb62504b7e789f58b7d9697009d565c4a18
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
(cherry picked from commit 8debeeb126)
2019-05-21 10:32:59 -07:00
Taesu Lee
43b9a8ceb4 Merge "Divide a message text into correctly sized parts" am: 8f7157ca48
am: b9f65a87d1

Change-Id: I6652537cd578dde7dfa9145898cee5ee43a50ecd
2019-05-20 23:38:01 -07:00
Taesu Lee
8debeeb126 Divide a message text into correctly sized parts
Message format info is required in order to divide a message text into
correctly sized parts on a device that supports for both 3GPP and 3GPP2
formats in multi-sim. And fixed to get default SMS subId from SmsManager
in SmsMessage class instead.

Test: Manual

Change-Id: Id2512eb62504b7e789f58b7d9697009d565c4a18
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-05-21 07:55:14 +09:00
Michael Groover
285a12043d Merge "Grant device ID access to app with carrier privlege on any sub ID" into qt-dev
am: 7aac1013b7

Change-Id: I78374a9cf934cc2826f322b95223de817f588a4e
2019-05-15 08:40:52 -07:00
Michael Groover
7aac1013b7 Merge "Grant device ID access to app with carrier privlege on any sub ID" into qt-dev 2019-05-15 15:26:13 +00:00
Michael Groover
dd2c16678f Grant device ID access to app with carrier privlege on any sub ID
Fixes: 132173603
Test: atest TelephonyPermissionsTest
Test: cts-tradefed run cts-dev -m CtsTelephony3TestCases
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts-dev -m CtsTelephonyTestCases -t android.telephony.cts.TelephonyManagerTest

Change-Id: I6a92790389db8ce08118e7f7f45d9309296d2551
2019-05-14 17:08:57 -07:00
chen xu
2a5483ff77 PhoneStateListener msim improvement
1. Docuemnt the scope of each callback event either apply to specific
subscriptions or not.
2. TelephonyRegistry store separate state e.g, precisecallstate, callAttribute
for each slot to support msim.
3. Add missing subscription match check when notify callbacks.

Bug: 130423985
Bug: 132181378
Test:  atest CtsTelephonyTestCases:PhoneStateListenerTest
Merged-In: I4b014e00528a1f05e0b5f237229c561f8260e2bd
Change-Id: I4b014e00528a1f05e0b5f237229c561f8260e2bd
(cherry picked from commit d5deeb15e9)
2019-05-13 21:38:12 -07:00
Chen Xu
5811135e2a Merge "checkCarrierPrivilegesForPackage by subId rather than default" into qt-dev
am: 856fe0fefc

Change-Id: Id20ca739786ef1fcaf242dbec3d5a004d19aa9a2
2019-05-13 18:30:01 -07:00
Chen Xu
856fe0fefc Merge "checkCarrierPrivilegesForPackage by subId rather than default" into qt-dev 2019-05-14 01:06:05 +00:00
chen xu
28fe1359ee checkCarrierPrivilegesForPackage by subId rather than default
1. checkCarrierPrivilegesForPackages by subId
2. getPackagesWithCarrierPrivileges by subId
3. new hidden API getPackagesWithCarrierPrivilegesForAllPhones which
returns packages for all subs.

Bug: 132078279
Test: Manual
Change-Id: Ic666218f0c290d1b428530982b689af110f74c69
2019-05-13 16:30:37 -07:00
Jordan Liu
f1aca7cf4e Merge "Update getMergedSubscriberIds to pass subId" 2019-05-13 18:16:18 +00:00
Jordan Liu
857c4cbf5f Update getMergedSubscriberIds to pass subId
Bug: 131189269
Test: manual
Merged-In: I0d237b646969442b71597e66c9cb491c02a144d3
Change-Id: I0d237b646969442b71597e66c9cb491c02a144d3
(cherry picked from commit 973a60d76ec29e7295237ef8b6670f81917b071b)
2019-05-10 14:39:11 -07:00
Brad Ebinger
42ce8673bb Merge changes from topic "sms_trampoline_intent-qt-dev" into qt-dev
am: 8b2d80c768

Change-Id: Ibbc07c961f1bdc19e1015885487e9f7b6a14fa83
2019-05-10 13:11:08 -07:00
Brad Ebinger
8b2d80c768 Merge changes from topic "sms_trampoline_intent-qt-dev" into qt-dev
* changes:
  Trampoline SMS disambig dialog to Telephony
  No longer show disambig when calling SmsManager#getSubId
2019-05-10 19:42:55 +00:00
Jordan Liu
e586fdea3f Merge "Update getMergedSubscriberIds to pass subId" into qt-dev
am: 4f8ad9cb35

Change-Id: I0d3885cd7506fbc900c358fec360ae893aa21662
2019-05-09 23:01:30 -07:00
Brad Ebinger
360415aa13 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

Change-Id: I6be1c6d7bf6b6ee614b6a7d0369147e3b1890588
2019-05-10 00:14:23 +00:00
Thom Hurks
118540582b Merge "Use correct variable for init in GsmAlphabet" am: f84cf464e9
am: 2a0d20e295

Change-Id: Icd1657553f0cbc918a0d85f518e863d83204f650
2019-05-09 16:59:22 -07:00
Thom Hurks
2a0d20e295 Merge "Use correct variable for init in GsmAlphabet"
am: f84cf464e9

Change-Id: I552f20acd1de433abecc1ce32912686a5401322d
2019-05-09 15:14:55 -07:00
Xin Li
5bc12066ca Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:45 +00:00
Jordan Liu
4f8ad9cb35 Merge "Update getMergedSubscriberIds to pass subId" into qt-dev 2019-05-09 21:27:58 +00:00
Thom Hurks
17a01554c7 Use correct variable for init in GsmAlphabet
When initializing the shift table in GsmAlphabet the correct
variable is now used. An error was logged already if the value
is wrong, so this does not have any logic correctness or
performance impact, just code correctness.
Test: very small refactoring. Tests still pass.

Change-Id: I5329cfa0be63b6a3ebd06414c6247d94ca93f40b
Signed-off-by: Thom Hurks <thomhurks@gmail.com>
2019-05-09 00:01:13 +02:00
Chen Xu
b3e9773d71 Merge "PhoneStateListener msim improvement" into qt-dev
am: bfe4c111c4

Change-Id: I52e237495ed72afca170034b295daa25541bdc70
2019-05-08 13:46:18 -07:00
chen xu
d5deeb15e9 PhoneStateListener msim improvement
1. Docuemnt the scope of each callback event either apply to specific
subscriptions or not.
2. TelephonyRegistry store separate state e.g, precisecallstate, callAttribute
for each slot to support msim.
3. Add missing subscription match check when notify callbacks.

Bug: 130423985
Bug: 132181378
Test:  atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: I4b014e00528a1f05e0b5f237229c561f8260e2bd
2019-05-08 18:20:51 +00:00
Jordan Liu
26dd1a5f4f Update getMergedSubscriberIds to pass subId
Bug: 131189269
Test: manual
Change-Id: I0d237b646969442b71597e66c9cb491c02a144d3
2019-05-07 17:14:15 +00:00
Jordan Liu
88f125c096 Merge "Update getUiccCardsInfo doc"
am: 39fbf96b5a

Change-Id: I2b3af7fb26bfd5e403401daaac37888877bca851
2019-05-01 15:02:42 -07:00
Jordan Liu
eb5c27d469 Update getUiccCardsInfo doc
This method will return info for inactive eUICCs, filtered by carrier
privilege. (Since we can't read carrier privilege on an inactive eUICC,
we always assume that the caller does not have carrier privilege).

Bug: 130826215
Test: manual
Change-Id: Id89fa48f119004b6c18bd21791396bc6c3df2c95
Merged-In: Id89fa48f119004b6c18bd21791396bc6c3df2c95
2019-05-01 10:32:36 -07:00
Michael Groover
0c107d5ce8 Merge "Revert "Tempoarily allow priv-apps access to device identifiers"" into qt-dev
am: 7abba0a4bc

Change-Id: I52ffd23a6daf6d69e90519024cf389c70196a8fc
2019-05-01 09:34:48 -07:00
TreeHugger Robot
7abba0a4bc Merge "Revert "Tempoarily allow priv-apps access to device identifiers"" into qt-dev 2019-05-01 09:05:42 +00:00
Jordan Liu
a7907d780d Merge "Update getUiccCardsInfo doc" into qt-dev
am: a49ff8b68e

Change-Id: Id421e57e4a4f35d1d8c335177bd928b9bbdc34e8
2019-04-30 19:55:10 -07:00
Michael Groover
de186b8cb7 Revert "Tempoarily allow priv-apps access to device identifiers"
This reverts commit 6e96da2927.

Reason for revert: Play and MTP/PTP issues have been resolved,
restoring device identifier access restrictions for priv apps.

Bug: 117781266
Test: cts-tradefed run cts-dev -m CtsTelephony3TestCases
Change-Id: I7ab432cfa92b6da65137608fc9d435d8296ffb84
2019-04-30 16:01:59 -07:00
Jordan Liu
a49ff8b68e Merge "Update getUiccCardsInfo doc" into qt-dev 2019-04-30 18:04:18 +00:00
Sooraj Sasindran
546be49a9f Merge "Show opportunistic provider name conditionally" into qt-dev
am: c6e0753506

Change-Id: I7b9018112f8808fae1533efaffa8b6d1129250a6
2019-04-30 07:10:37 -07:00
Sooraj Sasindran
0d45da7abb Show opportunistic provider name conditionally
For testing purpose, we want system UI to show grouped CBRS carrier name
as in the upper left corner in system UI. But we want to make this a
conditoinal behavior.

Bug: 129865342
Test: manual
Change-Id: I38a49447ca07615b5e14a92412b68a2a44b2726c
2019-04-26 14:44:07 -07:00
Jordan Liu
5867df3139 Update getUiccCardsInfo doc
This method will return info for inactive eUICCs, filtered by carrier
privilege. (Since we can't read carrier privilege on an inactive eUICC,
we always assume that the caller does not have carrier privilege).

Bug: 130826215
Test: manual
Change-Id: Id89fa48f119004b6c18bd21791396bc6c3df2c95
2019-04-26 21:28:08 +00:00
Xiangyu/Malcolm Chen
386d538f9d Merge changes from topic "128616035"
am: dc4d14b37a

Change-Id: I0f9807127cdd46079a969532bdeb121bf544921d
2019-04-19 10:14:32 -07:00
Malcolm Chen
4d6ff22849 Adding @hide API to return whether an APN is metered or not.
In addition, make isMmsDataEnabled more generic:
isDataEnabledForApn

Bug: 128616035
Test: manual
Change-Id: Icd520c3094dd761a13435fae79b7b6b3ba2ebda9
Merged-In: Icd520c3094dd761a13435fae79b7b6b3ba2ebda9
2019-04-19 01:23:39 -07:00
Malcolm Chen
7611d69c75 Add API to set alwaysAllowMms
Add API in SubscriptionManager setAlwaysAllowMmsData
and isMmsDataAllowed.

Bug: 128616035
Test: unittest
Change-Id: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
Merged-In: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
2019-04-18 19:55:33 -07:00
Xiangyu/Malcolm Chen
1a17f08c28 Merge "Adding @hide API to return whether an APN is metered or not." into qt-dev
am: 7deafd415b

Change-Id: Ibb9f5bc4988fab052327fe3fb54918e815089a4d
2019-04-18 19:34:41 -07:00
Malcolm Chen
9562a92874 Adding @hide API to return whether an APN is metered or not.
In addition, make isMmsDataEnabled more generic:
isDataEnabledForApn

Bug: 128616035
Test: manual
Change-Id: Icd520c3094dd761a13435fae79b7b6b3ba2ebda9
2019-04-18 16:40:39 -07:00