- When there is no specified SubscriptionInfo, Wi-Fi data usage will be displayed. In this case, the carrier service package also needs to be hidden.
- Fix failing test cases in DataUsageListTest
Bug: 273167633
Bug: 280021214
Test: manual test
Change-Id: I66ff8a28d9e7f7db77c8a210cb36676a07fc2c7d
This is because before fix mLoadAppRunnable is async run. And the
getContext() within it will return null when the Fragment in some not
ready lifecycle.
Use viewLifecycleOwner.lifecycleScope.launch to ensure the async
function will only be run when the view is ready, and automatically
canceled when out of scope.
Since this requires Kotlin Coroutine so migrate DataSaverSummary to
Kotlin, other functionality are keep no change.
Fix: 279863347
Test: Manual
Change-Id: I2e97a071c103e63b3306b801fc38f4704e3be0d2
Both "Mobile data usage" & "Non-carrier data usage".
By,
1. Use summary placeholder for usage amount to avoid shift
2. Before fix CycleListener's onItemSelected() is called multiple times,
cause the app list to flash, let DataUsageList to handle the dedup
logic to better handling.
3. Before fix if return from App Usage page, no loading view is
displayed (only first enter has it), move this to onResume() to fix.
4. Before fix the cycles passed to App Usage page is cached (even when
the cycles are changed), clear the cache when onResume() to fix.
5. Listener in SpinnerPreference could be null, add safety guard to it.
Cherry-pick from Change-Id: I95e544c46333496f4f30ed77dafa4779b4d66019
Fix: 277162513
Test: manual visual test
Test: Unit test
Change-Id: I50fb79aa3c888651a79fd1d030da554bebb6a660
- Don't show DataUsageList if the user is a guest
Bug: 262741858
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageListTest
Change-Id: Id877c2235c6a65683f2d0a0ba381dffba4dd95b8
- Don't show DataUsageSummary if the user is a guest
Bug: 262243574
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryTest
Change-Id: I94d0fd18a81dc0f0adba544340e648d58c5d3358
Revert submission 19748582-settings_yesno
Reason for revert: Common strings in English could be translated into different strings in other languages.
Reverted changes: /q/submissionid:19748582-settings_yesno
Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
For some unknown reason, the merged imsi list might contain
duplicated items. Deduplication for better error handling.
Test: make RunSettingsRoboTests
Fix: 271298466
Change-Id: I3cbe8f9441769963a16720fc5128db173fa0868b
Previous work on data saver performance got disabled, this is a change to re-enable it.
Bug: 249502488
Test: build pass
Change-Id: I7264b1e8c21a789db358e0aae70a2cf0ce09ebba
(cherry picked from commit 2115d0e495)
BillingCycleSettings and Settings.ACTION_MOBILE_DATA_USAGE needs
mobile NetworkTemplate to work correctly.
Bug: 268411305
Test: manual
Change-Id: I7e2eafff39f1bffeb8adbe4d7c3567b7a4ea7dda
through Settings search
1. Avoid from generating search report when user been restricted.
2. Guest user should have this restriction but not available, add
additional rule as a conpensation from UI's perspective.
Bug: 260860114
Test: local
Change-Id: I63ba7f3b10fc812dd1498f17826a15e822879613
Ethernet is enabled when either FEATURE_ETHERNET *or* FEATURE_USB_HOST
is present. See ConnectivityService#deviceSupportsEthernet.
ConnectivityService#deviceSupportsEthernet should really be moved to
some commonly accessible location.
Test: TH
Change-Id: I497d99169248db7e5948b3a19134ab42e66d5b9b
"One" and "1" are not same, such as "1st place" vs "a
place". Also in many languages, plurals expression is different with English, for more detail please check: go/android-i18n-plurals.
So in string res file, replace "one" with excat value "1" is a more
proper way.
Test: Existing unit tests still pass.
Bug: 199230342
Change-Id: I832abc38afc5d8816fa803865c25e6017cffa2c6
Enhancing the control of R.bool.config_show_data_saver when false, which including:
1. Initial presentation is invisible
2. Leaving UI when triggered
3. Avoid from getting searched
4. Robolectric test case support
Bug: 243877672
Test: test cases and local testing
Merged-In: I909522c0244ebb012a27d6aff34120a4f90128c6
Change-Id: I909522c0244ebb012a27d6aff34120a4f90128c6
Enable the UI control through configuration.
Bug: 240515161
Test: local, auto test
Merged-In: I5e49a2b0f2b563b426354f4d2e6e650dcc02c98b
Merged-In: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
Change-Id: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
Enhancing the control of R.bool.config_show_data_saver when false, which including:
1. Initial presentation is invisible
2. Leaving UI when triggered
3. Avoid from getting searched
4. Robolectric test case support
Bug: 243877672
Test: test cases and local testing
Change-Id: I909522c0244ebb012a27d6aff34120a4f90128c6
mDataUsageState is nullable in UnrestrictedDataAccessPreference.java, so we'd better
add a annotation to getDataUsageState(), and add a null-check before calling it.
Bug: 246828843
Test: manual and Robotest.
Change-Id: If7fea53ec7efd004391a09becdba5709ae686f40
- Declare the service callback as static class and use WeakReference to avoid the callback link being occupied
- Use application context instead of fragment context to avoid context being occupied by external modules
Bug: 237273138
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPreferenceControllerTest
Change-Id: Icca145b8ef08b9949feafbbd4e761f8d50c99181
- The Unrestricted data need to take a long time to load from ApplicationsState.loader (more then 256ms)
- Load Unrestricted data after Settings launched
Bug: 227863469
Test: manual test, analyze results with perfetto UI.
Change-Id: I5e49a2b0f2b563b426354f4d2e6e650dcc02c98b
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.
Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
Should access API which is irrelated to status of data limit.
Changing from API isDataEnabledForApn(ApnSetting.TYPE_DEFAULT)
into isDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER).
Bug: 223361190
Change-Id: Iada89de38e9db3706a944c7a5b5f8a3e87d415e5
Test: Manual
(cherry picked from commit 7e530dda39)
Should access API which is irrelated to status of data limit.
Changing from API isDataEnabledForApn(ApnSetting.TYPE_DEFAULT)
into isDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER).
Bug: 223361190
Change-Id: Iada89de38e9db3706a944c7a5b5f8a3e87d415e5
Test: Manual