Commit Graph

912 Commits

Author SHA1 Message Date
James Lin
2f5d2a48c1 Merge "Fix showing "Invalid Network Mode 26. Ignore" on Preferred network type" into rvc-dev am: a7a3304a20 am: 0fa4005981
Change-Id: Idc57a86546b7e42adeebf1743ef90fec4baf43a6
2020-03-27 10:29:18 +00:00
James Lin
a7a3304a20 Merge "Fix showing "Invalid Network Mode 26. Ignore" on Preferred network type" into rvc-dev 2020-03-27 09:56:32 +00:00
James.cf Lin
9f8edf2b67 Fix showing "Invalid Network Mode 26. Ignore" on Preferred network type
After setting the network to telephony framework, Setting UI didn't check this network type when show on the UI and show the invalid string.

Bug: 152373426
Test: manual
Change-Id: Ibf280a9905edcb7bd241a1505e85ac5e83993634
2020-03-27 09:54:08 +08:00
Xiangyu/Malcolm Chen
90f9b73775 Merge "Show footer to notify user no 5G in DSDS mode." into rvc-dev am: b0a5905d08 am: 0358e150fb
Change-Id: If6e8b2f0b0e6b4031bf850577849ce4bbdf6fede
2020-03-27 00:58:12 +00:00
Xiangyu/Malcolm Chen
b0a5905d08 Merge "Show footer to notify user no 5G in DSDS mode." into rvc-dev 2020-03-27 00:24:23 +00:00
Malcolm Chen
b5e7565175 Show footer to notify user no 5G in DSDS mode.
Bug: 151657272
Test: manual and robotests
Change-Id: I5df95528aae12b43a15389b8048f14d9508272f3
2020-03-26 10:31:42 -07:00
Bonian Chen
f63423f5da Merge "[Settings] Change the restart policy for MobileNetworkActivity" into rvc-dev am: fbe5a997d3 am: ada7e519fd
Change-Id: I5d88ede47c721d2db2521477631ee87ec02922c5
2020-03-26 09:59:10 +00:00
Bonian Chen
d412e06c39 [Settings] Change the restart policy for MobileNetworkActivity
Prevent recreating the fragment in MobileNetworkActivity when the
subId is the same.

Bug: 141833767
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkActivityTest
Change-Id: I8167781fb462efa310a5d6bac76d880dbc9b6bfc
2020-03-26 17:44:17 +08:00
Bonian Chen
78b3e60c9b Merge "[Settings] Avoid re-create fragment when subscription not changed" into rvc-dev am: 8bbebc03a6 am: f4db2d1056
Change-Id: I076fbd468413ca55f6de66e403e0c3b871544399
2020-03-25 19:06:44 +00:00
Bonian Chen
8bbebc03a6 Merge "[Settings] Avoid re-create fragment when subscription not changed" into rvc-dev 2020-03-25 18:33:05 +00:00
Bonian Chen
3d8a4d2484 [Settings] Avoid re-create fragment when subscription not changed
Simply updating the content of fragment instead of re-create it in order
to improve the performance of mobile network page.

Bug: 149190278
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkActivityTest
Change-Id: I744c2d76b814abdb619c8f40c3f113902ad8a827
2020-03-25 23:59:12 +08:00
Zhen Zhang
fb5a490371 Merge changes Ibd2f4111,Ia6cc60bc into rvc-dev am: c37fcd0cb8 am: a12da1ba40
Change-Id: I9a84a10f0aab8d9b3a059eb2a89c998041aafab4
2020-03-25 08:03:17 +00:00
Zhen Zhang
c37fcd0cb8 Merge changes Ibd2f4111,Ia6cc60bc into rvc-dev
* changes:
  Fix crash in AllInOneTetherSettings when user is not admin
  Refactor new tether settings to remove SharedPreferences
2020-03-25 07:25:07 +00:00
Bonian Chen
ff7dc60895 Merge "[Settings] Code refactor on MobileNetworkActivity" into rvc-dev am: f9bb3b4d05 am: 0f4345cdf6
Change-Id: Ibce5efebb8c0fd20471811f7cd5ce324a5b347c1
2020-03-25 04:51:01 +00:00
Bonian Chen
806c9d5214 [Settings] Code refactor on MobileNetworkActivity
Apply the behavior of ProxySubscriptionManager into
MobileNetworkActivity.

Bug: 149190278
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkActivityTest
Change-Id: I2d4b12dead7a9ea68cc8e335cd37f22226fe295f
2020-03-25 10:19:40 +08:00
TreeHugger Robot
d169749e7d Merge "[Settings] Avoid from Settings crash" into rvc-dev am: d227755be8
Change-Id: I2fb1ee5ab5f737660676b27062b89329e9cedf81
2020-03-24 23:47:44 +00:00
Bonian Chen
dcf701efc3 [Settings] Avoid from Settings crash
Avoid from crash when null pointer.

Bug: 152336444
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkActivityTest
Change-Id: I77314f697d8a99d77b9f5fe0a48ddbae69634743
2020-03-25 05:48:37 +08:00
Bonian Chen
0a5211a6d5 Merge "[Settings] Replacing SubscriptionManager#addOnSubscriptionsChangedListener API" into rvc-dev am: 9a0f633600
Change-Id: I42831f5540acd25bc6129ca14ad42b1717cf9e98
2020-03-24 07:15:24 +00:00
Zhen Zhang
3b53b80715 Fix crash in AllInOneTetherSettings when user is not admin
When user is not admin, we should skip the setup and tear down
procedures in AllInOneTetherSettings' lifecycle. Also, the switch for
"Hotspot & tethering" on "Network & internet" should be disabled in such
case.

Bug: 151648198
Test: Build and flashed to crosshatch device. Using guest user, the
settings won't crash when using AllInOneTetherSetting and the switch is
disabled.

Change-Id: Ibd2f4111c53b8b9fa6a18504a681a27b966a3c46
2020-03-24 06:58:41 +00:00
Bonian Chen
073f483d86 [Settings] Replacing SubscriptionManager#addOnSubscriptionsChangedListener API
Replace SubscriptionManager#addOnSubscriptionsChangedListener API in
order to compatible with legacy design.

Bug: 151838951
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=SubscriptionsChangeListenerTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=ActiveSubsciptionsListenerTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=SimStatusDialogControllerTest
Change-Id: Ib98ce0dcbf18b6f48a6f267dd9e7be017d571157
2020-03-24 11:51:23 +08:00
Calvin Pan
70218097f4 Merge "Clear the entries in updateState" into rvc-dev am: 861d3446ab
Change-Id: I67ac551c8498d9029a0c61ef7d1672fae0f2b18f
2020-03-23 10:23:56 +00:00
Calvin Pan
861d3446ab Merge "Clear the entries in updateState" into rvc-dev 2020-03-23 10:11:58 +00:00
Bonian Chen
3ca9e69e2b Merge "[Settings] Apply ImsQueryController#isServiceStateReady to VoLte" into rvc-dev am: 31315e4172
Change-Id: I13bdb4cb0a9cf1cc8b7f9930a50a016d208acae3
2020-03-23 06:36:27 +00:00
calvinpan
8c6218013d Clear the entries in updateState
When user select the prefer network type that will also invoke
updateState(), so need to clear the entries to prevent adding duplicate
item.

Bug: 152031192
Test: By manual.
Change-Id: I05c5eae658cf72bdf05f5007b4aeba575ab14d61
2020-03-23 14:09:54 +08:00
Zhen Zhang
7f2d6ce058 Refactor new tether settings to remove SharedPreferences
Bluetooth, USB and Wifi Disable tether preferences will turn on/off that
type of tethering interface instantly without storing it into
SharedPreferences. They are listening to TetherEnabler to update their
state.
Refactored to remove dependancy on SharedPreferences.

Bug: 151367756
Test: TetherEnablerTest; BluetoothTetherPreferenceControllerTest;
UsbTetherPreferenceControllerTest;
WifiTetherDisablePreferenceControllerTest; AllInOneSettingsTest;
AllInOneTetherPreferenceControllerTest

Change-Id: Ia6cc60bc4de8f08413beb6d41552a18f6fa6a55b
2020-03-20 13:15:10 -07:00
Bonian Chen
b90fe0b04c [Settings] Apply ImsQueryController#isServiceStateReady to VoLte
Apply ImsQueryController#isServiceStateReady() to VoLte part

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gLteSliceHelperTest
Change-Id: I1535df837f2e015cd1afb0891fd69a98c7d6991a
2020-03-20 23:33:47 +08:00
Bonian Chen
be71dbdda7 Merge "[Settings] mSubId should not be overridden in TelephonyBasePreferenceController" into rvc-dev am: 26fb6c29c1
Change-Id: I218e2a34c62eaef6307475d1c5add31d3ff9ded4
2020-03-20 11:01:52 +00:00
Bonian Chen
e495a049c4 Merge "[Settings] Avoid from accessing IMS with invalid subscription id" into rvc-dev am: 06899ffb8e
Change-Id: Ia9cef50655182a53cae97115708490848974b78e
2020-03-20 11:01:48 +00:00
Bonian Chen
26fb6c29c1 Merge "[Settings] mSubId should not be overridden in TelephonyBasePreferenceController" into rvc-dev 2020-03-20 10:52:38 +00:00
Bonian Chen
06899ffb8e Merge "[Settings] Avoid from accessing IMS with invalid subscription id" into rvc-dev 2020-03-20 10:48:03 +00:00
Bonian Chen
594c267e99 [Settings] mSubId should not be overridden in
TelephonyBasePreferenceController

mSubId is a protected member provided by parent class.
Overriding mSubId should be avoided.

Bug: 150535296
Test: manual
Change-Id: I391b034c9badd43094ab52b8b6488bca07ef3c86
2020-03-20 10:46:52 +00:00
Bonian Chen
4a49f426fb [Settings] Avoid from accessing IMS with invalid subscription id
Check subscription ID before accessing to IMS APIs

Bug: 149190278
Test: make and manual test
Change-Id: I0561529ccaf23c84d7d6dd3e268386ab82f17418
2020-03-20 13:31:35 +08:00
Sooraj Sasindran
9c35cfa688 Revert "access system resources with android.R package" am: 253ba4f3ef
Change-Id: I78a68e8eef3b3cee9911cb89a9bd09ce83020357
2020-03-20 04:58:39 +00:00
Sooraj Sasindran
3e26fc0f21 Revert "access system resources with android.R package"
Revert "access system resources with android.R package"

Revert submission 10146616-sim_colors

Reason for revert: b/151455581
Bug:151455581
Reverted Changes:
I1e698d404:access system resources with android.R package
Id1eab78a8:access system resources with android.R package
I38b2e096e:access system resources with android.R package
I82bff7bd4:access system resources with android.R package
I554812a9d:access system resources with android.R package
I17831cd35:access system resources with android.R package
I2ccb04c0e:access system resources with android.R package
If25b159e1:access system resources with android.R package
Idc1095563:access system resources with android.R package
Ie0189ef3b:make sim_colors a system config

Change-Id: Ia2b1fd28dee08da03b6f1e7892ac3562edad00e4
2020-03-20 01:37:47 +00:00
Sooraj Sasindran
253ba4f3ef Revert "access system resources with android.R package"
Revert submission 10146616-sim_colors

Reason for revert: b/151455581
Bug:151455581
Reverted Changes:
Idc1095563:access system resources with android.R package
Id1eab78a8:access system resources with android.R package
I1e698d404:access system resources with android.R package
I38b2e096e:access system resources with android.R package
I82bff7bd4:access system resources with android.R package
I554812a9d:access system resources with android.R package
I17831cd35:access system resources with android.R package
I2ccb04c0e:access system resources with android.R package
If25b159e1:access system resources with android.R package
Ie0189ef3b:make sim_colors a system config

Change-Id: I1e370f0eadce02508b0a16e01e51c4ac5b002ac9
2020-03-20 01:37:30 +00:00
Peter Wang
e85186f38e Merge "[API Review] APIs in SubscriptionManager" into rvc-dev am: 6c95bb5cf6
Change-Id: I904e10cf91836c1d25d6b318dff364185f5a796f
2020-03-19 20:16:15 +00:00
Peter Wang
6c95bb5cf6 Merge "[API Review] APIs in SubscriptionManager" into rvc-dev 2020-03-19 20:07:39 +00:00
Bonian Chen
a65de8cd51 Merge "[Settings] Replace ImsManager#getImsServiceState()" into rvc-dev am: c073abaf2e
Change-Id: Id53c6a31d6c3dcf61482f1d3fcff13bb17a6ffa3
2020-03-19 04:48:29 +00:00
Bonian Chen
c073abaf2e Merge "[Settings] Replace ImsManager#getImsServiceState()" into rvc-dev 2020-03-19 04:35:39 +00:00
Peter Wang
4aeb063f75 [API Review] APIs in SubscriptionManager
Bug: 146362772
Bug: 148180034
Test: atest SubscriptionControllerTest, TelephonyDatabaseHelperTest, TelephonyProviderTest
Change-Id: I7bb9b088f1a08aaac5b43f264a77272aa52d562d
2020-03-18 16:50:31 -07:00
Automerger Merge Worker
c63489139c Merge "Add NR Global to the logic to check if it is Global" into rvc-dev am: 76f4a29510
Change-Id: Ic2788de5e3d7926813d5f36293cef55f67edc131
2020-03-17 13:03:09 +00:00
calvinpan
ff11f200c8 Add NR Global to the logic to check if it is Global
Bug: 151285260
Test: Build pass
Change-Id: I4d84c6669d6385bef5d75fca4cd6f2ff17533b6e
2020-03-17 18:27:34 +08:00
Automerger Merge Worker
a4fc50d316 Merge "Hide the 5G opiton when 5G has been disallowed" into rvc-dev am: 59f5eb638e
Change-Id: If8c5007d7d1c2ca48420850acce74db358959f0f
2020-03-12 06:38:34 +00:00
Calvin Pan
59f5eb638e Merge "Hide the 5G opiton when 5G has been disallowed" into rvc-dev 2020-03-12 06:25:11 +00:00
Automerger Merge Worker
43c4fa35da Merge "Disable 5G Scanning in NetworkScanHelper" into rvc-dev am: a8bee76d11
Change-Id: I8727fec517436adf608b26fc1372c7c43cfa504a
2020-03-10 16:58:34 +00:00
calvinpan
75867d8f63 Hide the 5G opiton when 5G has been disallowed
1. Create PreferenceEntriesBuilder for 5G entry. In the past, the
preferred network type entries was based on CarrierConfigManger value
but 5G option is based on allowed netowork type and device access
family, so include 4G and 5G logic in PreferenceEntriesBuilder.

2. If user selected item not in preferred network option, settings will
auto selected on the first item. For example, if user selected on 5G and
device disallowed 5G(5G option will be hide), so settings will selected
on first item(4G).

Bug: 149721842
Test: EnabledNetworkModePreferenceControllerTest

Change-Id: Ic447a137f9db4cf1a0048a8e58487c29b402bb48
2020-03-10 10:23:43 +00:00
Nathan Harold
adbc1ac905 Disable 5G Scanning in NetworkScanHelper
5G has two operating modes: stand-alone and non-standalone.
The vast majority of support is currently for non-standalone
mode. Because Android currently cannot tell the difference
between the supported modes in the modem, and because a device
that supports non-standalone mode shoudn't scan for 5G during a
PLMN selection procedure (it can't camp on 5G, hence non-
standalone mode), disable 5G scans by default and revisit once
modem support exists to distinguish between the two modes. This
avoids alternatives such as allowing 5G to be silently removed
in the RIL or for a 5G scan to be performed which doesn't provide
the user any meaningful options.

A separate bug has been filed (b/151119451) to revisit this logic
once the modem supports interrogation of its 5G capability.

Bug: 149528140
Test: compilation
Change-Id: I4e19b43e6529b5c673bb54c6f8f94c44a7c5bee5
2020-03-09 19:39:56 -07:00
Automerger Merge Worker
72d0b2773b Merge "[Settings] NullPointerException when disable eSIM/Fi" into rvc-dev am: 613dcd9dfe
Change-Id: Ia1696bcb7e420ae4d1da0b604ce0ac53352d3b12
2020-03-09 20:08:32 +00:00
Bonian Chen
613dcd9dfe Merge "[Settings] NullPointerException when disable eSIM/Fi" into rvc-dev 2020-03-09 17:13:50 +00:00
Automerger Merge Worker
d4970a9df1 Merge "Refresh summary when update state of preference" into rvc-dev am: bde2d44bb1
Change-Id: I035e835ec5565100464fe1b14108b49cedca7546
2020-03-09 04:13:27 +00:00