Commit Graph

56273 Commits

Author SHA1 Message Date
Bonian Chen
1c97e70641 [Settings] Grant permissions to submit junit test
Grant permissions for adding new Junit test case.

Change-Id: Iabde2307669815fd50cdba241492c82b9e2cf64d
2020-08-13 18:49:31 +08:00
Bonian Chen
7903cf872e Merge "[Settings] Refactor PhoneStateListener" 2020-08-13 08:13:25 +00:00
Bonian Chen
e01df59027 [Settings] Refactor PhoneStateListener
Remove Looper and update of mSubId

Bug: 144542981
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest

Merged-In: Ie6ae5b5914322644f2655e585b03a6b685bbc84a
Change-Id: I5306b3a80220c02d2de1b25f20e8ef7f845e9a09
2020-08-13 13:02:04 +08:00
Bonian Chen
3b8794d16b Merge "[Settings] Replace getSimCount() API" 2020-08-13 04:27:36 +00:00
Bonian Chen
5560882548 [Settings] Replace getSimCount() API
Change design of monitor change in Settings.Global.MOBILE_DATA and
Settings.Global.DATA_ROAMING in order to avoid from accessing
getSimCount().

Bug: 144251589
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Merged-In: I965a0c07c7c9ef5897b33809bae6a7921977db18
Change-Id: I8010f74c41826b081aa9f599d33a9519a1888215
2020-08-13 10:56:55 +08:00
Bonian Chen
6fe15deeb1 Merge "[Settings] Code refactor for Wifi calling IMS API" 2020-08-12 08:41:29 +00:00
Treehugger Robot
5a19cea4ef Merge "Prevent errors when updating operator pref summary" 2020-08-12 05:54:27 +00:00
Bonian Chen
91412b5069 [Settings] Code refactor for Wifi calling IMS API
Replacing logics of
ImsManager#isWfcEnabledByPlatform() &
MobileNetworkUtils#isWfcProvisionedOnDevice()
into WifiCallingQueryImsState#isWifiCallingProvisioned().

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSliceHelperTest
Merged-In: I68462368669b81e10d09bbb93e74e23ea9a1f446
Change-Id: I26d616f082a4dd3f2cb14defc5f68218f668ad48
2020-08-12 13:43:46 +08:00
Bonian Chen
60d00b58f3 Merge "Change MobileNetworkUtils to use EuiccManager.isSupportedCountry" 2020-08-12 04:10:10 +00:00
Bonian Chen
f116c5fae7 Merge "Override 2 getSliceUri() instance to return platform slice" 2020-08-11 08:05:10 +00:00
Fan Zhang
6c046831de Override 2 getSliceUri() instance to return platform slice
(This is not a clear cherry-pick, @Override need to be removed.)

Bug: 126222433
Test: robotest
Merged-In: I3f9c8202d9b75b24b80ebcf385abc95f8df851e2
Change-Id: Iec9fae48e91baef5861baef946fc155b1eb37904
2020-08-11 04:24:27 +00:00
Bonian Chen
5c4154b2e4 Merge "Add interface and extend db to support storing slice uris" 2020-08-11 02:23:56 +00:00
Jiashen Wang
889f702829 Change MobileNetworkUtils to use EuiccManager.isSupportedCountry
Currently LPA passed supported/unsupported countries to Settings by
writing the value into properties which is not ideal. Instead, we should
call EuiccManager.isSupportedCountry instead.
Bug: 147674689
Test: 1) Manually tested by flashing the change to the device
2) Change LPA to override onGetIsEuiccSupportedCountry
3) Make sure LPA can get the request

Merged-In: Ib136beea325eabdfbd8a6a843611143958dce603
Change-Id: If406d9d803affa334c1ad4f871fcfdc0561c9bf6
2020-08-10 22:57:02 +08:00
Bonian Chen
7e6c957fea Merge "Show/hide 5G preferred network type also consider allowed_network_type" 2020-08-10 11:07:41 +00:00
Bonian Chen
75124d794c Merge "Remove PreferenceCategory wrapper" 2020-08-10 10:12:14 +00:00
Raff Tsai
91d40cdb21 Remove PreferenceCategory wrapper
- Avoid similiar issue in b/130396913

Bug: 124129485
Test: manual
Merged-In: I6f4698304210bacba5c76020c375dda49330d2cc
Change-Id: I9d5d856f586ab660a5adb17c0bb1f49e90eca198
2020-08-10 17:03:13 +08:00
Fan Zhang
f609df425d Add interface and extend db to support storing slice uris
Bug: 126222433
Test: manual
Merged-In: Ie81e69477d297aa96a0daad02d56196c956271a3
Change-Id: Ifdae6fc47dc078ba83c211d07d6028f00f11e6f2
2020-08-10 16:50:21 +08:00
Josh Hou
abe032ea66 Show/hide 5G preferred network type also consider allowed_network_type
1. The carrier or privileged apps will enable/disable network types on
the device, so Settings references the allowed network type to show/hide
5G preferred network type option.

2. For mainline, copy the getNetworkTypeFromRaf() from RadioFamily to
Settings.

Bug: 136730709
Test: Manual test & EnabledNetworkModePreferenceControllerTest
1. Enable allowed_network_type
2. Disable allowed_network_type
Merged-In: I493f2a2c7f4bc32b3fcb8ab2bace5839d8667bd5

Change-Id: Id591f454a60d0ba08c3fc4a2ffe40836dafeb5f0
2020-08-10 16:18:36 +08:00
Bonian Chen
d1998a6fe8 Merge "[Settings] Code refactor" 2020-08-10 07:02:46 +00:00
Bonian Chen
c1ec7f1fea Merge "Replaced reference to setPreferredNetworkType" 2020-08-10 05:51:23 +00:00
Sneh Bansal
da432283cf Prevent errors when updating operator pref summary
The response for manual network selection request may come after the
fragment that displays the search results is already destroyed, say
when the user moves out of the results screen. In this case, attempting
to update the summary for the chosen operator preference leads to an
exception.

Check whether the preference to be updated is still valid before
attempting to update its summary.

Bug: 161422555
Test: Manually tested - verified that no exception was thrown when the
response of manual network selection request was received after the
fragment was destroyed.
Change-Id: I087c0e101fa75f229bc4353defbb14e8bf30153f
2020-08-07 16:34:48 +08:00
Bonian Chen
e3f6b13fb0 [Settings] Code refactor
Remove unused import

Bug: 10956255
Test: build pass
Merged-In: I256870483d85bf7000556357071834cad24884d1
Change-Id: Iced417b1e84ac082ec9bdffb0634ca9d4597e9e1
2020-08-07 07:51:35 +00:00
Bonian Chen
99a7c3ef00 Merge "Remove the second network scan." 2020-08-07 07:06:31 +00:00
Bonian Chen
37a0c3873f Merge "The text on toast should be changed when remains 1 time for SIM lock input" 2020-08-07 07:04:36 +00:00
Lee Chou
4fd08a2145 Replaced reference to setPreferredNetworkType
replaced with @SystemApi setPreferredNetworkTypeBitmask

Bug: 147405973
Test: make RunSettingsRoboTests ROBOTEST_FILTER=EnabledNetworkModePreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=PreferredNetworkModePreferenceControllerTest

Merged-In: I8ae86595b104dcd16daacbf52cc8eaa5e7a3d08b
Change-Id: Ia66cfc8fe109cfc038a8b53969bcd562727dbbc2
2020-08-07 14:59:38 +08:00
Bonian Chen
64c40305b4 Merge "Add NR Global to the logic to check if it is Global" 2020-08-07 06:42:10 +00:00
Tsung-Mao Fang
d042a9f2d3 The text on toast should be changed when remains 1 time for SIM lock input
The behavior of getQuantityString() is different according to language, it gets both "other" and "one" string if English is system language. But it always gets "other" string if non-English, then the "other" string of wrong_pin_code is shown even if remains 1 time of SIM lock input.

In order to change the string in any language, we add new string for remains 1 time.

Test: Rebuild rom
Fix: 71783850
Merged-In: If4b53bbbc6b51582bc0837abf4497d9a75ebbaad
Change-Id: I1c069333b19399b727e10ed4a6c9483cc1bc44a6
2020-08-07 06:19:07 +00:00
calvinpan
20d2826381 Add NR Global to the logic to check if it is Global
Bug: 151285260
Test: Build pass
Merged-In: I4d84c6669d6385bef5d75fca4cd6f2ff17533b6e
Change-Id: I5b0414302c9214116de30212a03a36972af29ca1
2020-08-07 13:11:02 +08:00
SongFerngWang
9bcf7861bd Remove the second network scan.
Fix: 153427564
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkSelectSettingsTest
(PASS)

Merged-In: If593fc4a4dd463bbc178b4864ad0ba01bb421b09
Change-Id: I34b898514351aa6c00934ce638e3a59a5aa8f077
2020-08-07 13:02:45 +08:00
Bonian Chen
c78b12f3f4 Merge "[Settings] Remove Phone hidden constants access" 2020-08-07 04:12:03 +00:00
Bonian Chen
2410478bee Merge "[Settings] Code refactor" 2020-08-07 04:11:29 +00:00
Bonian Chen
0f68ecf2ee [Settings] Remove Phone hidden constants access
Remove access to:
1. Phone.CDMA_SUBSCRIPTION_UNKNOWN
2. Phone.PREFERRED_NT_MODE
3. Phone.PREFERRED_CDMA_SUBSCRIPTION

Bug: 147794713
Test: manual
Merged-In: I18c2fa70a47fa7fb082a974dbd5acd61cf9f9c38
Change-Id: I438afb81ccad20971a15eb1fe0af7d37202c6a88
2020-08-06 23:58:24 +08:00
Bonian Chen
f84f6e49ee [Settings] Code refactor
Minor code refactor

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Merged-In: I060e7c880d91a0e5059610c5ceae319d47c19c7a
Change-Id: I378b3c7ad5531efd5f2dad4bdafbcddacaf66db4
2020-08-06 23:24:29 +08:00
Bonian Chen
bb750ad2d7 Merge "[Settings] Avoid from EUICC access blocking main thread" 2020-08-06 06:05:35 +00:00
Bonian Chen
9ec200f85c Merge "[Settings] Enable access from non-UI thread" 2020-08-06 06:05:29 +00:00
Bonian Chen
35f53d7fbd Merge "[Settings] Sync summary of call preference with dialer" 2020-08-06 06:05:17 +00:00
Bonian Chen
96533385f0 Merge "[Settings] Access ProxySubscriptionManager within DataUsage" 2020-08-06 04:21:45 +00:00
Bonian Chen
0cfec664c4 Merge "Remove useless png and add vector drawable" 2020-08-06 03:11:56 +00:00
Bonian Chen
75b3666b02 Merge "[Mainline] Use isActiveSubscriptionId instead of isActiveSubId for mainline" 2020-08-06 03:11:21 +00:00
changbetty
f1a52da792 [Mainline] Use isActiveSubscriptionId instead of isActiveSubId for mainline
Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DisabledSubscriptionControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkSwitchControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=SimSelectNotificationTest

Merged-In: If740c2d7ea2c1392d5fe538091ea6e5c4575ad26
Change-Id: Idca7a76c591448a45ecc33cb392f416c70d32f91
2020-08-06 09:14:58 +08:00
Raff Tsai
cbd234e1c1 Remove useless png and add vector drawable
Bug: 139336138
Test: visual
Merged-In: I5ccf4855b63f47b138a1662317d0c4ba8ce8984c
Change-Id: If7de9126c8afab3422999db66ad9b7a179334f10
2020-08-06 09:03:32 +08:00
Bonian Chen
e24a23f9ab Merge "Look up CBS package name through PackageManager." 2020-08-05 22:44:23 +00:00
Xin Li
cded32987b Merge "Merge QQ3A.200805.001" 2020-08-05 21:05:34 +00:00
Bonian Chen
12c22d8066 [Settings] Access ProxySubscriptionManager within DataUsage
Redirect some SubscriptionManager access to ProxySubscriptionManager.
This will reduce some access latency.

Bug: 141833767
Test: manual
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Merged-In: I2cb30dd0570a09543a13ca01cf054ba2d18d70d4
Change-Id: I536b45fd5ddd5d9d9591a133a0f79227a670d7dd
2020-08-05 23:04:45 +08:00
Bonian Chen
95d85a0742 [Settings] Avoid from EUICC access blocking main thread
Avoid from EUICC accessing form main thread and timeout if API takes too
much time.

Bug: 143996139
Test: manual
Merged-In: Ic1a2bd948b69d40632555d293df6ed56a6b7a712
Change-Id: Ia2a15ee43ce2b49b90c8d0626aee939c536aea56
2020-08-05 22:17:50 +08:00
Amit Mahajan
42d1d4be6b Look up CBS package name through PackageManager.
Instead of hardcoding it.

Test: manual
Bug: 154436403
Merged-In: I0feb356e6cd4868f71198bdee49a7658b4b98b5d
Change-Id: I9b3b3464614eac7394434e55eb142bc1053e8758
2020-08-05 21:58:45 +08:00
Bonian Chen
defa3f47b5 [Settings] Sync summary of call preference with dialer
Replacing the display of summary part within Settings' calls preference
by VoIP account when configured calling account settings within Dialer.

The click behavior for calls preference remain unchanged, due to this is
the configuration for subscription (instead of for all kinds of
accounts).

Bug: 136277187
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DefaultSubscriptionControllerTest
Merged-In: Iaa5fa1f3efe7ba2463caa0b450077f885d42b1c8
Change-Id: I6f2f44d305119f09e2188de702f14f2506a4903c
2020-08-05 18:17:04 +08:00
Bonian Chen
80edde750a [Settings] Enable access from non-UI thread
To support query from settings intelligent, these listeners need to
support accessing from non-UI thread.

Bug: 149543756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ActiveSubsciptionsListenerTest
Merged-In: I768f41f76d0223634be2b728d33fa0cfcc69fe69
Change-Id: I5d076d95410a2d904f8ebb1d82df90dd6aa52099
2020-08-05 17:55:12 +08:00
Bonian Chen
3e545f2bef Merge "[Mainline] Copy the method getSelectableSubscriptionInfoList from SubscriptionManager to Settings" 2020-08-05 09:16:55 +00:00
Bonian Chen
d3c8a4c3ee Merge "Mainline remove hide api SubscriptionInfo.getCardString" 2020-08-05 09:03:44 +00:00