Commit Graph

6420 Commits

Author SHA1 Message Date
Brad Ebinger
7c28e44f40 Fix parcelling issue for certain fields.
Bug: 131614858
Test: atest GtsTelephonyTestCases
Change-Id: I2bac24f3004df3852f8c0031e16de0d73848bc2d
2019-05-16 01:27:44 +00:00
David Brazdil
2959b5c136 Change CellSignalStrengthGsm.mTimingAdvance to greylist-max-p
Hidden APIs whose access has been restricted in Q should be assigned
maxTargetSdk=P. Fix a field in CellSignalStrengthGsm which was assigned
maxTargetSdk=O.

Bug: 124354830
Test: check out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I025887bf7fbc513da155bfe12919cfea9bd9c5fa
2019-05-15 09:58:50 +00:00
Amit Mahajan
ed4fe03371 Merge "Add NAME_SOURCE_CARRIER for subscription display name." into qt-dev 2019-05-15 06:03:07 +00:00
Xiangyu/Malcolm Chen
8343ad4285 Merge "Adding subscription group owner." into qt-dev 2019-05-14 23:13:19 +00:00
Jack Yu
0d40a9c7f8 Merge "Fixed incorrect metered/unmetered APN in AP-assisted mode" into qt-dev 2019-05-14 21:00:15 +00:00
Amit Mahajan
24e102e0e0 Add NAME_SOURCE_CARRIER for subscription display name.
Test: manual
Bug: 131803649
Change-Id: Ieb7d691fb88866162b287f87d5a2b2d94adac7c3
2019-05-14 10:41:59 -07:00
Jack Yu
7ff7865d7b Fixed incorrect metered/unmetered APN in AP-assisted mode
From now all data traffic through IWLAN will be unmetered. Only
data through cellular will be checked for metered/unmetered.

Test: Unit tests
Bug: 132433959
Change-Id: Id1498fb8627dd7221a5ab7cde72929e6ee25b425
2019-05-13 22:41:49 -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
Jiyong Park
6651eb2142 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
Change-Id: I6760f6e4068239361c495ae7c0de3e25f91d38e1
2019-05-11 12:40:50 +09:00
TreeHugger Robot
5968659e8f Merge changes from topics "role-dialer-dialog", "role-sms-dialog" into qt-dev
* changes:
  Deprecate intent action to the old changing default dialer/SMS dialogs.
  Remove TelecomManager.ACTION_CHANGE_DEFAULT_DIALER for apps targeting Q.
  Remove Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT for apps targeting Q.
2019-05-11 03:01:50 +00:00
Hai Zhang
929085f3c3 Deprecate intent action to the old changing default dialer/SMS dialogs.
Bug: 124452117
Bug: 131204827
Test: presubmit
Change-Id: Iee636cf2dbcf4bdda5fc487d6883591e9463b0af
2019-05-10 17:48:30 -07:00
Malcolm Chen
f81aae0981 Adding subscription group owner.
Define owner of a subscription group. Such that when subscriptions are
being added into or removed from a group, as long as callingPackage is
the owner, it can skip carrier permission check on the subscriptions in
the group.

This is necessary when a subscription is being added into a
group that contains inactive subscription, which mean its carrier
privilege can't be verified.

Bug: 131854492
Test: cts, unittest, TelephonyManagerTestApp
Change-Id: If2f5b9c8d71469d9e60f1ca48cab36938cd72c48
2019-05-10 16:00:47 -07:00
Anil Admal
3fc1f7aa73 Merge "Make non-framework emergency location notification configurable" into qt-dev 2019-05-10 21:21:36 +00: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
Anil Admal
befd483289 Make non-framework emergency location notification configurable
Add carrier config parameter to enable/disable posting notification
in the status bar when device location is provided for non-framework
location requests in user initiated emergency use cases.

Bug: 130892418
Test: Manual verification
Change-Id: Ibd10f68c6804f7a6f72feb4fa7948ff5629bbeeb
2019-05-10 12:30:16 -07:00
Michael Groover
b0401fb609 Document device ID access restriction target SDK behavior
Fixes: 132392748
Test: Build
Change-Id: I9aed95087eb97fe206501a464187347e139eb2c3
2019-05-09 19:36:57 -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
Jordan Liu
4f8ad9cb35 Merge "Update getMergedSubscriberIds to pass subId" into qt-dev 2019-05-09 21:27:58 +00:00
TreeHugger Robot
0bf807f2f8 Merge "Add new carrier config for supporting WPS over IMS" into qt-dev 2019-05-09 18:20:19 +00:00
Brad Ebinger
588c2c0e17 Merge "Use requestType, not service type for interrogation check" into qt-dev 2019-05-09 18:14:04 +00:00
andychou
dcc0dd2efc Add new carrier config for supporting WPS over IMS
Some carriers allow WPS over IMS but carrier not allow.
Add a carrier config and dial WPS call over IMS or CS per config value

Bug: 131917532
Test: Override Carrier Config and test WPS over IMS or CS
Change-Id: Idb698b12ba08086584e1883cc61e31f924ae42cb
2019-05-10 00:33:15 +08: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
Brad Ebinger
fa3fc22dbc Use requestType, not service type for interrogation check
Test: atest GtsTelephonyTestCases
Bug: 127258685
Change-Id: I9502c8efe20fc7ce2d2f9e03f3e1b09c28c45de0
2019-05-07 23:45:46 +00:00
Brad Ebinger
fa82dddcf6 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
Change-Id: I71ad38f76750c750b149e4cdcb6fcf99ed89212e
2019-05-07 23:09:50 +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
Shuo Qian
73c5892fc9 Merge "Sorting and merge Emergency number better" into qt-dev 2019-05-06 23:31:08 +00:00
Jordan Liu
c560293e15 Merge "Revert "Update documntation for getCardId"" into qt-dev 2019-05-06 23:14:35 +00:00
Jordan Liu
d8ec08c62b Revert "Update documntation for getCardId"
This reverts commit 67b80596b5.

Reason for revert: b/131868150
Bug: 131423779
Change-Id: I7c373e2949cbb8e98322500ae6a1c866fcbfcba0
2019-05-06 22:04:07 +00:00
Youming Ye
e74b7d2365 Merge "Pass in external packageName" into qt-dev 2019-05-06 20:34:14 +00:00
Ecco Park
aaaadd579a Merge "CarrierConfig: add the wifi configs for Carrier-Wifi Application." into qt-dev 2019-05-06 18:11:22 +00:00
Leland Miller
5df2e3e7ec Merge changes from topic "permissions" into qt-dev
* changes:
  Add calling package parameter to IRcs methods
  Use injected instance of RcsControllerCall
  Create new RcsMessageQueryResultParcelable
  Create new RcsParticipantQueryResultParcelable
  Create new RcsThreadQueryResultParcelable
2019-05-06 16:35:06 +00:00
Ecco Park
5110c41737 CarrierConfig: add the wifi configs for Carrier-Wifi Application.
The new configs for wifi will be used in Carrier Wi-Fi Application to
connect the wifi networks defined by a carrier.

Bug: 129964730
Test: unit test
Change-Id: I4d02a19d25626d7331f139e9e85062b05720ac51
Signed-off-by: Ecco Park <eccopark@google.com>
2019-05-06 07:09:01 -07:00
sqian
a1f21a5c2c Sorting and merge Emergency number better
Apply more parameters to sort Emergency number list, it is important
to keep two lists Collection-equal to each other if they have the same
contents. Otherwise, it will introduce more unnecessary updates in
 EmergencyNumberTracker and it may confuse users.

Test: atest EmergencyNumberTest
Bug: 131922424
Change-Id: I64a43886d4000b261ea703b081e6278b0307805f
2019-05-03 22:27:44 +00:00
Youming Ye
35c8488104 Pass in external packageName
Use external packageName when ActivityThread couldn't get calling package
due to calling identity cleaned.

Bug: 131287254
Test: Manual
Change-Id: Icec3ad7193bc5988799188a7a1e68aebc0dc109d
2019-05-03 15:09:49 -07:00
chen xu
6b46264c96 only set PhoneStateListener subId for sdk target >=Q
subId from PhoneStateListener is deprecated from Q. And we should
only set subId for informational purpose for Q+ only.
Do not change the legacy behaviour for apps target on preQ SDK level

Bug: 131863032
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testOnUnRegisterFollowedByRegister
Change-Id: Iff1758f9645e74690094207d92b5989553b27b25
2019-05-03 14:20:51 -07:00
Leland Miller
fcc04ddfeb Add calling package parameter to IRcs methods
This will be used for permission handling in the IRcs service.

Test: Existing tests pass, both unit and RcsCtsTestCases
Change-Id: I7f2183cd2f764b8293d29dc2c278479e06d9d8a2
Merged-In: I7f2183cd2f764b8293d29dc2c278479e06d9d8a2
Bug: 123699565
(cherry picked from commit 995c9ad44d)
2019-05-02 14:04:40 -07:00
Leland Miller
4137a85cd9 Use injected instance of RcsControllerCall
Instead of static methods, create an instance of RcsControllerCall that
holds a reference to the Context and inject it where it is used.

This will be used in a follow up commit that will require the calling
package name be passed when calling IRcs methods.

This change will allow passing a calling package name to an
RcsServiceCall or an RcsServiceCallWithNoReturn, so uses of the call
method might look something like:

```
mRcsControllerCall.call((iRcs, callingPackage) ->
        iRcs.getFileTransferContentUri(mId, callingPackage));
```

Alternatives to storing the context here would have been:

1. To store the context everywhere the RcsControllerCall is injected and
   get the calling package name at each RcsControllerCall call

2. To store the calling package name everywhere that the
   RcsControllerCall instance is injected

Compared to solution 1, the implemented solution avoids repeating the
logic of retrieving the calling package.

Compared to solution 2, the implemented solution does not introduce any
complexity. In addition, the individual classes do not care about the
calling package name outside of the need to pass it to an IRcs method.
In the future, the implemented solution may also provide a useful point
to provide logic involving calls and the context (or other injected
dependencies). Though this future concern is not alone enough to justify
the solution, since the solution adds no additional complexity against
other solutions, it seems like a nice benefit.

Note, to avoid polluting this commit, a follow-up issue (b/128029441)
has been created to adjust the name of RcsControllerCall to reflect that
an instance of RcsControllerCall does not represent a single call to
RcsController.

Bug: 123699565
Test: Existing tests pass
Change-Id: Ib0f55f14397e5eb1e5a55864094c0be0c4e37c06
Merged-In: Ib0f55f14397e5eb1e5a55864094c0be0c4e37c06
2019-05-01 13:37:03 -07:00
Leland Miller
168b1b95a1 Create new RcsMessageQueryResultParcelable
This parcelable class now backes RcsMessageQueryResult. This change will
allow injection of API layer dependencies into RcsMessageQueryResult.

Change-Id: I4bb58413a814a51f4e79490e740f51cc92bb1073
Merged-In: I4bb58413a814a51f4e79490e740f51cc92bb1073
Test: Existing tests pass
Bug: 123699565
(cherry picked from commit 35d29333f1)
2019-05-01 13:36:57 -07:00
Leland Miller
74dd6997b1 Create new RcsParticipantQueryResultParcelable
This parcelable class now backes RcsParticipantQueryResult. This change
will allow injection of API layer dependencies into
RcsParticipantQueryResult.

Change-Id: I6d002d1e9b61831169eee66f76fed743beffc446
Merged-In: I6d002d1e9b61831169eee66f76fed743beffc446
Test: Existing tests pass
Bug: 123699565
(cherry picked from commit 3e90221eb9)
2019-05-01 13:36:33 -07:00
Leland Miller
80b6b789cf Create new RcsThreadQueryResultParcelable
This parcelable class now backes RcsThreadQueryResult. This change will
allow injection of API layer dependencies into RcsThreadQueryResult.

Change-Id: I2c273513e2a3bfcab7cd84fc7a2f89cc2ad12c75
Merged-In: I2c273513e2a3bfcab7cd84fc7a2f89cc2ad12c75
Test: Existing tests pass
Bug: 123699565
(cherry picked from commit 89a9bfe4c0)
2019-05-01 13:35:51 -07:00
Jordan Liu
67b80596b5 Update documntation for getCardId
Test: manual and atest TelephonyManagerTest
Bug: 131423779
Change-Id: I7b384ec7265e219aee82164476d7d2d96e0f94a0
(cherry picked from commit c43c6b505d)
2019-05-01 17:28:12 +00:00
Chen Xu
62751b8014 Merge "improve mism support for phonestatelistner" into qt-dev 2019-05-01 02:44:28 +00:00
chen xu
84a90870aa improve mism support for phonestatelistner
1. from Q forward, throw exception if use constructor with subId
2. from Q forward pass subId from TelephonyManager to telephonyregistry.
3. update API in systemUI and other components.

Bug: 117555407
Test: Manual mism test
Change-Id: Ic139a3739e5d86d07a6093bdbe6350001a756f60
2019-04-30 15:45:21 -07:00
Hall Liu
1923b35e15 Merge "Fix WFC location privacy carrier config" into qt-dev 2019-04-30 20:00:18 +00:00
Jordan Liu
a49ff8b68e Merge "Update getUiccCardsInfo doc" into qt-dev 2019-04-30 18:04:18 +00:00
Hall Liu
f30b5acaa5 Fix WFC location privacy carrier config
Set the default value for whether to show the privacy warning for wifi
calling to false.

Bug: 67872298
Test: compiles
Change-Id: I1cdecfa0005389d60e4c20cd2348c286249c22a2
2019-04-30 07:53:03 -07:00
Brad Ebinger
cf297467e0 Rollback SHELL UID check for CarrierConfigLoader
When a test calls adoptShellPermissionIdentity before
calling a command, it doesn't adopt the shell UID, only
the permissions. So, we can not use
Binder#getCallingIdentity to determine it the API is
being called as part of a test. For now, we must only
use MODIFY_PHONE_STATE until a better pattern is
established.

Test: Manual
Bug: 131185660
Change-Id: I59d32a2e36950b2485e1a46a25e3724928676219
2019-04-29 22:06:35 +00: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
calvinpan
ea6d2b1e1e 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
Change-Id: Ib00cfe3640b59db5f971c32741eed999131e67c0
2019-04-25 10:06:05 +00:00