Commit Graph

302 Commits

Author SHA1 Message Date
Nazanin Bakhshi
408704dfea Merge "Store subscriber ID / IMSI into telephony database" into qt-dev 2019-06-19 18:09:33 +00:00
Malcolm Chen
bfa821b43a 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
2019-06-18 23:35:05 +00:00
Nazanin Bakhshi
a120f95d26 Store subscriber ID / IMSI into telephony database
Bug: 131916175
Test: manual
Change-Id: I64cd12a6737b7ef7fb31b851c1cbb5b7f46e6ca7
Merged-In: I64cd12a6737b7ef7fb31b851c1cbb5b7f46e6ca7
(cherry picked from commit 4e97d2c105)
2019-06-14 17:39:06 -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
Nazanin Bakhshi
7ca2360714 Revert "Store subscriber ID / IMSI into telephony database"
This reverts commit 3dc7e3a4f6.
Bug: 134113745
Bug: 131916175
Reason for revert: <breaking presubmit>

Change-Id: Icd9235fc09eb6c1eacdb5b3bc02585cf23de7fc4
Merged-In: I501aed14d73b7cc19f9c492a7fe451eac127e8e4
2019-05-31 17:54:03 +00:00
Nazanin Bakhshi
3dc7e3a4f6 Store subscriber ID / IMSI into telephony database
Bug: 131916175
Test: manual
Change-Id: Ia353d23cff698d973bd63ac59fd92dd0f2978317
Merged-In: Ia353d23cff698d973bd63ac59fd92dd0f2978317
2019-05-30 20:05:19 +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
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
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
Jordan Liu
656f6f8b66 Do not populate SLOT_KEY with wrong slot info
The slotId is not necessarily the phoneId, so do not broadcast as if it
is. SLOT_KEY is a hidden extra so this should not impact apps in general
(if they need the old extra they can still use the hidden PHONE_KEY).

For select broadcasts like SIM_CARD_STATE_CHANGED, we will manually
populate the slot key. This is a temporary solution to b/130664115 and
we should eventually review and consider making the SLOT_KEY public for
some broadcasts.

Bug: 130664115
Test: manual
Change-Id: I84bd4c6bc4277e32cee9916dd18dd80948a808a0
(cherry picked from commit 21c3aeb49d)
2019-04-23 18:15:14 +00:00
Xiangyu/Malcolm Chen
f447240a0c Merge "Add API to set alwaysAllowMms" into qt-dev 2019-04-17 17:14:55 +00:00
Malcolm Chen
8402ba5593 Add API to set alwaysAllowMms
Add API in SubscriptionManager setAlwaysAllowMmsData
and isMmsDataAllowed.

Bug: 128616035
Test: unittest
Change-Id: Ie56c2d0619a68b188c35e8e24db6c2012d22538b
2019-04-15 17:03:21 -07:00
Hall Liu
75319d28ad Add EHPLMN and HPLMN to SubscriptionInfo
Add EHPLMN and HPLMN fields to SubscriptionInfo. These fields are read
from the ICC card.

Bug: 130253962
Test: manual
Change-Id: If98c57c14e39b917a5e7e8bbc59c2170989b63a7
2019-04-15 15:43:30 -07:00
Jack Yu
5d8f6447a7 Fixed the incorrect function signature
The name source should be an integer instead of long

Test: Manual + unit tests
Bug: 130237749
Change-Id: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
2019-04-10 14:40:59 -07:00
Malcolm Chen
e00887f612 Add comments in grouping APIs to clarify possible exceptions.
Bug: 127408608
Test: cts, unittest, TelephonyManagerTestApp
Change-Id: I3671e366be7e8c3a75b5ee23b7cf88a33ecd3a4f
2019-04-09 01:22:30 +00:00
Malcolm Chen
938dc54b57 Remove hidden IntDef in java doc.
Bug: 128456336
Test: build
Change-Id: If016aabda5092d299eca2e858f26057614767297
2019-03-29 18:55:01 -07:00
Xiangyu/Malcolm Chen
764bf9cbeb Merge changes from topics "128902411", "128645056"
* changes:
  API Feedback for CBRS
  Remove clearDefaultsForInactiveSubIds.
2019-03-22 06:48:24 +00:00
Malcolm Chen
32240b572b API Feedback for CBRS
Bug: 128902411
Test: unittest
Change-Id: I2476834a5048d0e3c2c3413d7168a7a3ad2d7042
2019-03-21 21:52:32 -07:00
Malcolm Chen
c4c05b6d92 Remove clearDefaultsForInactiveSubIds.
clearDefaultsForInactiveSubIds is no longer needed as Telephony
has internal logic to clear or update default settings automatically.

Bug: 128645056
Test: manual
Change-Id: Ib7bc0ae6dba6f10e3a052df1644cc77dd30121a9
2019-03-19 14:17:24 -07:00
Malcolm Chen
7a7e06d968 Better description and parameter name of setPreferredDataSubscriptionId
Bug: 128455935 128456058
Test: build
Change-Id: I41ae6752756d998739fd7635bcc7765f255806d7
2019-03-19 14:04:01 -07:00
Malcolm Chen
fd838e9585 Remove SubscriptionManager#setMetered API.
Bug: 123661746
Test: sanity
Change-Id: Ia6772dee1bd566e0be6b06455d92c923d2c01b12
2019-03-18 13:52:37 -07:00
Shuo Qian
53df1e44ff Merge "Explain the difference of isValid, isActive, isUsable" am: 9c649215f6 am: 614f1e0bba
am: a2d4a163db

Change-Id: I6f1632a89a5e66427938286bb1e96c63b8392ed9
2019-03-14 15:40:47 -07:00
sqian
0bcdd6cbd4 Explain the difference of isValid, isActive, isUsable
Bug: 118675257
Test: compile
Change-Id: Ibec1bf7929991ca0e2910684f5216ab8372d4e95
2019-03-14 11:34:01 -07:00
Malcolm Chen
b82864c801 Only return one mobile subscription per group in Settings.
Right now getSelectableSubscriptionInfoList returns all subscriptions
that are visible and available. But we should only show one per
subscription group. So updating getSelectableSubscriptionInfoList
to make sure of it.

Bug: 126438122
Test: manual - group Fi primary subscriptions and make sure only
one Fi subscription is shown in Settings UI.
Change-Id: I867296b4f8efbdf2e9885ef34dd45806fa0abbca
Merged-In: I867296b4f8efbdf2e9885ef34dd45806fa0abbca
2019-03-13 04:14:07 +00:00
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
Malcolm Chen
310718530c Don't return hidden subscription in getActiveSubscriptionInfoList.
Bug: 121396526
Test: manual
Change-Id: I3a9f3a9a2628a8e2ad1c401f6fe5e4c5866a0047
Merged-In: I3a9f3a9a2628a8e2ad1c401f6fe5e4c5866a0047
2019-03-12 13:39:15 -07: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
Sooraj Sasindran
153a235d10 Merge "Modify API return type and add callback." 2019-03-09 05:44:06 +00:00
Malcolm Chen
006e294300 Update document of setSubscriptionEnabled public API.
Bug: 126391008
Test: build
Change-Id: Iffb7895f94f8d0b2d071edb1e06c8e99be14be4f
2019-03-08 23:46:00 +00:00
danielwbhuang
1f2850c472 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
Change-Id: I32fe1407deabe36485227ec75931bec334d85abe
2019-03-08 12:30:15 +08:00
Xiangyu/Malcolm Chen
442084c722 Merge "Adding callback for setPreferredDataSubscriptionId." 2019-03-07 22:47:31 +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
Sooraj Sasindran
6315e59275 Should not turn on validation for data
Should not turn on validation for data switch every time.
Provide result as a callback

Test: verified manually
Bug: 126264455
Change-Id: I5df2311d91fdab34563148b4466163696e52faf9
2019-03-05 22:16:57 +00:00
Malcolm Chen
1a63a0f5c5 Clean up shouldHideSubscription API
Combine shouldHideSubscription and isInvisibleSubscription
for better readability.

Bug: 126637721
Test: manual - use test app to call SubscriptionManager APIs to make
sure they return correct values.

Change-Id: I0deb463430a6825db40ec00abac49cb662e79437
2019-02-28 19:19:37 -08:00
Chen Xu
f2e5e06c2e Merge "add NonNull and Nullable annotation to APIs" am: c931e9b0c0 am: 715c2d87cc
am: 3bc4573765

Change-Id: I35e81dcc8e091e91cf335587849c596134781a7c
2019-02-28 18:54:02 -08:00
chen xu
8165386bfe add NonNull and Nullable annotation to APIs
Bug: 126699430
Bug: 126699963
Bug: 126700457
Bug: 126700771
Bug: 126702453
Bug: 123939479
Test: Build
Change-Id: Ib429d2918e63f8d272fc7842b0abd83ffd5a9090
2019-02-28 14:15:58 -08:00
TreeHugger Robot
e27e04cdc8 Merge "Only return one mobile subscription per group in Settings." 2019-02-28 13:09:46 +00:00
Malcolm Chen
0e7ad2f3fe Only return one mobile subscription per group in Settings.
Right now getSelectableSubscriptionInfoList returns all subscriptions
that are visible and available. But we should only show one per
subscription group. So updating getSelectableSubscriptionInfoList
to make sure of it.

Bug: 126438122
Test: manual - group Fi primary subscriptions and make sure only
one Fi subscription is shown in Settings UI.
Change-Id: I867296b4f8efbdf2e9885ef34dd45806fa0abbca
2019-02-28 02:23:40 +00:00
Malcolm Chen
e0e0f71e9b Adding nullability annotation.
For below APIs:
removeOnOpportunisticSubscriptionChangedListener
switchToSubscription

Bug: 126391202
Test: build
Change-Id: I791fd6307371ef9a1918b119f4a1b15623517157
2019-02-27 15:51:24 -08:00
Malcolm Chen
d91d6b24f8 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
2019-02-22 00:49:37 +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
Xiangyu/Malcolm Chen
fe96d9d2e5 Merge "Don't return hidden subscription in getActiveSubscriptionInfoList." 2019-02-15 03:59:39 +00:00
Malcolm Chen
5b16f8d92b Don't return hidden subscription in getActiveSubscriptionInfoList.
Bug: 121396526
Test: manual
Change-Id: I3a9f3a9a2628a8e2ad1c401f6fe5e4c5866a0047
2019-02-13 20:11:01 -08:00
sqian
a31ef445e9 Call e.rethrowFromSystemServer() to exception of setDefaultSmsSubId
Test: Treehugger
Bug: 123927534
Change-Id: Ica15965cb904b758e078b8439e5e9d3f39b9c0a2
Merged-In: Ica15965cb904b758e078b8439e5e9d3f39b9c0a2
(cherry picked from commit 04e94fcb0a)
2019-02-13 17:06:05 -08:00
Shuo Qian
59f5a5ec94 Merge "Call e.rethrowFromSystemServer() to exception of setDefaultSmsSubId" 2019-02-14 00:51:19 +00:00
sqian
04e94fcb0a Call e.rethrowFromSystemServer() to exception of setDefaultSmsSubId
Test: Treehugger
Bug: 123927534
Change-Id: Ica15965cb904b758e078b8439e5e9d3f39b9c0a2
2019-02-13 14:41:44 -08:00
Jordan Liu
7d7c8698ab Merge "Update documentation for SubscriptionManager listener" am: 75a0066880 am: 0d95ed6e88
am: 885cdce4cf

Change-Id: Ibcc15c236e7b36d83a0c2ba51b54f3e7ac8b9408
2019-02-13 12:31:03 -08:00
Jordan Liu
75a0066880 Merge "Update documentation for SubscriptionManager listener" 2019-02-13 19:26:58 +00:00
Xiangyu/Malcolm Chen
30a48d7a09 Merge "Adding callback for setPreferredDataSubscriptionId." 2019-02-12 18:40:09 +00:00
Jordan Liu
45da505ecd Update documentation for SubscriptionManager listener
This will match the documentation in TM.listen() and PhoneStateListener.

Bug: 124204168
Test: no behavior change
Change-Id: Ifde6382e4b6947417a89032805499c48288f8438
2019-02-12 10:31:35 -08:00