Commit Graph

17 Commits

Author SHA1 Message Date
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Shen Lin
eb627be0b4 Mark DataUsageState as nullable to avoid potential NPE risk
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
2022-09-15 14:23:38 +08:00
TreeHugger Robot
1503c4ea31 Merge "Remove restricted icon" 2022-02-15 07:26:27 +00:00
Yanting Yang
49f2385cde Fix NPE of UnrestrictedDataAccessPreference
Add null check for the DataUsageState to avoid NPE since it comes from
the extraInfo of AppEntry that possibly be null.

Fixes: 217250071
Test: manual
Change-Id: I1a41a49ed74bc6addc6b5dd0564973c210a6af74
2022-02-10 18:04:48 +08:00
Edgar Wang
b1a48df4f7 Remove restricted icon
Bug: 195401182
Test: robotest
Change-Id: I6b22b3b9b62812eb08f10492bd2d7908cce89d39
2022-02-08 03:09:50 +00:00
Yanting Yang
19bdc6ce67 Apply a new icon cache mechanism for memory improvement
- Avoid loading all app icons at once to decrease memory usage.
- Only load visible icons when entering the apps page.
- Reserve icon placeholder to alleviate icon loading flicker.
- Release icon cache when low memory or leaving apps page.

Bug: 187118427
Bug: 209898662
Test: manual check the smoothness and memory usage of apps pages.
Change-Id: Ifc3c2a73cc88d6e42739df4e8208445afa12e0ea
2022-01-27 17:20:58 +08:00
Edgar Wang
cdff5c6ceb Revert "Apply SettingsLib SeekBarPreference to Settings"
Revert submission 13422386-seekbar-sc-dev

Reason for revert: build broken in SettingsGoogle
Reverted Changes:
I0c2d0d5fb:Apply SettingsLib SeekBarPreference to SettingsGoo...
I1844bb3b0:Apply SettingsLib SeekBarPreference to a11y vibrat...
Ia3e4adec8:Apply SettingsLib SeekBarPreference to a11y vibrat...
Iadee57e9d:Apply SettingsLib SeekBarPreference to a11y vibrat...
I219878716:Apply SettingsLib SeekBarPreference to Settings
I959f5672c:Create SettingsLibSeekBarPreference
I92545a69c:Apply SettingsLib SeekBarPreference to a11y vibrat...

Change-Id: Ie6c3b0dc072e044796abdb33fca305f9f9d47c4d
Bug: 176818438
2021-06-08 09:47:51 +00:00
Edgar Wang
d6b5bbb5cb Apply SettingsLib SeekBarPreference to Settings
Bug: 176818438
Test: robotest

Change-Id: I219878716457ce4bb7cad251bccf5d50d93030a5
2021-06-07 18:09:19 +00:00
Edgar Wang
fc02ce1c20 Refactor AppPreference and AppSwitchPreference
- Move AppSwitchPreference
- Remove FeatureflagPreference summary

Bug: 176815722
Test: robotest
Change-Id: Id337097f237ac9ca6dfa01665df61b1258dc24f2
2021-01-05 18:27:08 +00:00
Edgar Wang
a8742aa7ab Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: Ia8625091a107fc3fb652d3ba3f75ea3cc1a8d9f5
2020-08-12 11:29:07 +08:00
Bonian Chen
a5f08854e3 [Settings] Inclusive language for Data Usage
Change wordings in data usage part into inclusive language.

Bug: 160707804
Test: make RunSettingsRoboTests
Change-Id: I713e52df8201413b884257a51bc1f71a0d43179d
2020-07-15 02:52:32 +00:00
Edgar Wang
0fc557bbc9 Fix App data usage screen header title changing after device orientation
- Chageed the title "App data usage" to "Mobile data & Wi-Fi"

Change-Id: I0fa00180eedda6be6189f871f9984ac164f9fb67
Fixes: 118770561
Test: visual & robotests
2018-12-27 20:07:31 +08:00
Doris Ling
282a0d9222 Remove "v2" from the data usage version 2 code.
Change-Id: I8ede82029194d1a9a43d00a3de7ec1a8dd77d978
Fixes: 117420679
Test: make RunSettingsRoboTests
2018-12-04 18:24:37 +00:00
Doris Ling
c11666cc00 Remove data usage v1 code.
- remove all v1 code and the corresponding feature flag switch.

Bug: 117420679
Test: make RunSettingsRoboTests
Change-Id: Ib062c03c671b0f860698f5e5e153ab46d963175a
2018-12-03 11:12:50 -08:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Yanting_Yang
db435e256d Migrate UnrestrictedDataAccess to DashboardFragment
- UnrestrictedDataAccessPreferenceController

Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.datausage
      make RunSettingsRoboTests -j ROBOTEST_FILTER=CodeInspectionTest
      atest UniquePreferenceTest

Change-Id: I71abd837ef51e4e9e0a2ee46791d704245c9b3ab
2018-05-14 21:18:38 -07:00