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
Hide some Preference which requires mobile data on device didn't support
it.
Bug: 221999174
Test: local
Change-Id: I7dd6e13aea0ed4467c7c7edeada564e42ea78349
Rename to setMobileDataPolicyEnabled per API council comments
Fixes: 171804465
Test: atest TelephonyManagerTest
Change-Id: Ib9ff4ee01e2af4d3fd368afffa36226100f11e2d
TelephonyManager had a minor refactor of some of the methods revolving
around mobile data. Change code in Settings to use the new ones instead.
Bug: 169367013
Test: existing unit tests, manual
Change-Id: I7ebae37373d53fb2c59b6b546232dbddf77398d4
Refactor DataDuringCallsPreferenceController in order to reduce the time
spend on constuct and initialize DataDuringCallsPreferenceController.
Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataDuringCallsPreferenceControllerTest
Change-Id: I484cafa739f9e6e58427894712f2bb7e2ed1f4ff
The DataDuringCallsPreferenceController didn't listen the mobile data changed and update the preference.
Bug: 149344454
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataDuringCallsPreferenceControllerTest
Change-Id: I0121f06efb5257dccc05ad06b93a9db263f012b5
This adds a switch which appears on the SIM details page for any SIMs
that aren't the default on for data. It lets the user opt-in to turning
on data on this SIM only in the case where there is an active call -
this is needed because in some cases the default data SIM may not be
able to be used when a call is active on another SIM.
Bug: 132114205
Test: make RunSettingsRoboTests
Change-Id: Ie44c56e0f486fd93aff411a0ba0e47d3695a4941