Commit Graph

9 Commits

Author SHA1 Message Date
Chaohui Wang
866b79c245 Clean up lifecycle in MobileNetworkSettings
To avoid double registering, which prevent potential issues and could
improve latency.

Since DashboardFragment already supported register lifecycle
automatically for the controllers bound by XML which implements
androidx.lifecycle.Lifecycle, so doing a cleanup to prevent register
lifecycle event manually (doubling).

Bug: 149338098
Test: temporarily add logging to make sure the lifecycle method is
      called and only called once
Change-Id: I4dbc36414991ef6b599be61aa77ff0dc8c52468c
2022-05-25 13:46:55 +08:00
Weng Su
7822750c31 Enable Carrier-Config cache for Settings
- Since the "Mobile-Data Details Settings" (NETWORK_OPERATOR_SETTINGS) will query Carrier-Config around 70 times during launching, use the Carrier-Config cache to reduce 69 times to speed up the launching time.

- It takes about 3ms to query a Carrier-Config each time.

- Create a singleton class to share the Carrier-Config for all
sub-settings.

Bug: 204135235
Test: manual test
atest -c ApnPreferenceControllerTest \
         AutoSelectPreferenceControllerTest \
         BackupCallingPreferenceControllerTest \
         CarrierConfigCacheTest \
         CarrierPreferenceControllerTest \
         CarrierSettingsVersionPreferenceControllerTest \
         DataServiceSetupPreferenceControllerTest \
         Enable2gPreferenceControllerTest \
         EnabledNetworkModePreferenceControllerTest \
         Enhanced4gBasePreferenceControllerTest \
         MobileNetworkUtilsTest \
         NetworkProviderBackupCallingGroupTest \
         NrAdvancedCallingPreferenceControllerTest \
         PreferredNetworkModePreferenceControllerTest \
         TelephonyTogglePreferenceControllerTest \
         WifiPickerTrackerHelperTest
make RunSettingsRoboTests \
     ROBOTEST_FILTER=ContactDiscoveryPreferenceControllerTest
make RunSettingsRoboTests \
     ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I26f9ac115a754910b5d59e820703f1a0e701bb7f
2022-01-14 23:28:50 +08:00
Janis Danisevskis
5cef487b4b resolve merge conflicts of d42d9a41f6 to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
2021-03-17 19:09:29 +00:00
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +00:00
allenwtsu
91f11e9a47 Change carrier config
Use KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL instead of
KEY_USE_RCS_PRESENCE_BOOL

Bug: 173828080
Test: build pass
Change-Id: I384686bd073a00341f4e552b71b24798619502fa
2020-12-15 00:28:20 +08:00
Brad Ebinger
525a07ec7f Fix NPE if CarrierConfigManager is not available
Fixes: 155147094
Fixes: 155819375
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.telephony
Change-Id: Iecf3e385a88d18c7578eb520449f4042324e21f5
Merged-In: Iecf3e385a88d18c7578eb520449f4042324e21f5
2020-05-26 15:50:41 -07:00
Brad Ebinger
c973423a34 Revise strings as per string UX review
Fixes: 154148793
Fixes: 155098265
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.telephony
Merged-In: Ia510ce5262fbe576718b0785175c0a82acb3c722
Change-Id: Ia510ce5262fbe576718b0785175c0a82acb3c722
2020-04-27 18:00:29 -07:00
Brad Ebinger
f469cac10a Add new DialogFragment and Controller for capability discovery opt-in
Adds a new controller to monitor the capability discovery opt-in
setting as well as a new DialogFragment, which displays a dialog
providing the user with more information before they enable the
setting.

Bug: 111305845
Test: manual
Merged-In: I70821964bc618c3c389c9039cd7f5028e34c7ebb
Change-Id: I70821964bc618c3c389c9039cd7f5028e34c7ebb
2020-03-25 16:19:54 +00:00