summaryrefslogtreecommitdiff
path: root/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
AgeCommit message (Collapse)Author
2021-05-06Merge "Fix inconsist color filling on collapsing toolbar" into sc-devTreeHugger Robot
2021-05-06Fix inconsist color filling on collapsing toolbarMill Chen
Some pages are updating the background color for action bar after action bar is created, which will break the animation of collapsing toolbar. It also causes the different color filled in the status bar and collapsing toolbar area separately. Removing the styleActionbar method from EntityHeaderController can fix this issue. Fix: 187019164 Test: robotests && visual verified 1) Settings -> Apps -> See all apps -> pick up either app -> Mobile data & Wi-Fi 2) Scrolling the content and see if the toolbar has the different color between status bar and toolbar Change-Id: Ic0842b9e6c48662872694534a3696c4b8900481f
2021-05-05wifi: Use new API for wifi data usage functionlesl
For wifi, a old API: buildTemplateWifiWildcard will includes the merged wifi which is included to mobile usage. It should not double count again. Call new API: buildTemplateWifi with NetworkId: NetworkTemplate.WIFI_NETWORKID_ALL and null subscriberId to get non-merged wifi usage. Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsageTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageInfoControllerTest Test: Manual Test, wifi data usage count correctly. Bug: 176396812 Change-Id: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
2020-10-16Merge "Hide 'View plan' button in data usage settings" into rvc-qpr-dev am: ↵TreeHugger Robot
1a09d244d4 am: 09a906b972 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12755868 Change-Id: I8101838915bb821e9ce6483ba2c7d21ad894a0e5
2020-10-08Hide 'View plan' button in data usage settingsSarah Chin
There are currently no callers of the setSubscriptionPlan() API that have a MDP app set up. Remove the button when SubscriptionPlans are defined, since it does nothing and causes confusion for users. Test: manually verify button does not exist when a plan is defined Test: make RunSettingsRoboTests Bug: 169806315 Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
2020-07-22[Wi-Fi] WiFi Settings inclusive language fix plan phase 2govenliu
Replace WiFi related terms which contain Blacklist,Dummy,Sane or Sanity Check wordings. Goal: Create a fixit for Android Platform to reduce the use of non-inclusive language for all code. Bug: 161425297 Test: make RunSettingsRoboTests -j Change-Id: I1ff89bd2a6636ada1e0f5b9879aecbbd5dab4012
2020-06-02[Settings] Move mobile data template out of frameworkBonian Chen
Move mobile data template out of framework Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageLibTest Change-Id: I5072cd1e673194d00b3ce82242bf5fbad88d23cd
2020-05-04[Settings] Query historical data in backgroundBonian Chen
Move the query of historical data into background thread to avoid from blocking other query operation in UI thread, Bug: 141833767 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest Change-Id: I61e414d70136a0025ddd7373a4f34a99acb89510
2020-04-28Merge "[Settings] Avoid mobile data usage init in WiFi usage" into rvc-devBonian Chen
2020-04-28[Settings] Avoid mobile data usage init in WiFi usageBonian Chen
Avoid from initial in WiFi usage and update into mobile data usage after refresh. Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: Ic6176952953ded9d47f1fc52c3f311e6568a5b90
2020-04-27[Settings] Align data usage calculationBonian Chen
Align the calculation of data usage between DataUsageSummaryPreferenceController and DataUsagePrefereneController. Bug: 143996139 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I73de79b5cc298bf949827eda0a8bb0274089c016
2020-04-24[Settings] Support re-init DataUsageSummaryPreferenceControllerBonian Chen
Support re-init DataUsageSummaryPreferenceController without re-constructing it. Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: If72a521c5fbaec8b8902fb80b13d9d0f07c716af
2020-04-23[Settings] Support the display of data usage when SIM inactiveBonian Chen
SIM can be inactive but remain existed within slot. Therefore, change the design here. Bug: 143996139 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I24ec529b120b2801f7b9089b07d32bdd1038883f
2020-04-23[Settings] Code refactor for data usageBonian Chen
Code refactor Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I22b323bae0b18cca26c62d047fdb504c012518b5
2020-04-22[Settings] Adopt TelephonyBasePreferenceController to data usageBonian Chen
Adopt TelephonyBasePreferenceController in order to better support DSDS. Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I502b93f01b289b72989ad3167131cc0c598b1583
2020-04-22[Settings] Fix DataUsageSummaryPreferenceControllerTestBonian Chen
Fix test case of DataUsageSummaryPreferenceControllerTest Bug: 154562264 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I0b3366c86b0a621b9dda88bbcde6e118d37995b7
2020-04-21[Settings] Refactor test case DataUsageSummaryPreferenceControllerTestBonian Chen
Refactor test case of DataUsageSummaryPreferenceControllerTest Bug: 141833767 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: Ieb551a32d87c53cbd0765e19e710f1f0469da9d5
2020-02-10[Settings] Access ProxySubscriptionManager within DataUsageBonian Chen
Redirect some SubscriptionManager access to ProxySubscriptionManager. This will reduce some access latency. Bug: 141833767 Test: manual Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: I2cb30dd0570a09543a13ca01cf054ba2d18d70d4
2020-01-20[Mainline] Removed non-formal API getAllSubscriptionInfoList to used in Settingschangbetty
Bug: 147206736 Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest Change-Id: Ie9c01afa2b128f8d296b160d3628ea1fb7176e59
2020-01-08[Settings] Avoid from accessing createManageSubscriptionIntent(int)Bonian Chen
Avoid from accessing SubscriptionManager#createManageSubscriptionIntent(int). Create a copy of source code into Settings. Bug: 147334060 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: Id44a6b214a8f5d378d7a536fbf984a0512e6a92d
2019-05-03Format app data usage using IEC unit, not SI unit.Fan Zhang
Fixes: 131924586 Test: visual Change-Id: Iedbd15fb9c98a5c93089708e40175cbf5572eeda
2019-03-14[Passpointv2] Implement DataUsage header for Wi-Fi detail fragmentcosmohsieh
Change header to a data usage chart of the specified Wi-Fi network. Bug: 124700353 Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings Change-Id: Ide08ffd5e97ced5fe54707562690155414598dac
2019-01-17Add data usage header to mobile network details pageAntony Sargent
As a part of the work for subscriptions UI improvements, we want to show data usage information at the top of the mobile network details page, and those details need to be specific to the particular subscription we're showing details for, even if that SIM isn't the current default one. This is useful for seeing data usage across your SIMs in dual-SIM devices. This CL adapts our already existing DataUsageSummaryPreferenceController class so that if can be used on any fragment instead of just the DataUsageSummary one, and changes it to take an explicit subscription id instead of assuming it should use the default one. Bug: 122670283 Test: make RunSettingsRoboTests Change-Id: I41e307b0f32580c73b08adec7cabf01c96d7e835
2018-08-28Sort importsFan Zhang
Having consistent import order will reduce chance of merge conflict between internal and external master Test: rebuild Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-06-18Reorder and clean up imports.Fan Zhang
Test: rebuild Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-05-09Establish permanently unavailable settingsMatthew Fritze
Distinguish between settings which are permanently unavailable on the device, and temporarily unavailable. This enables us to restrict which setting slices are exposed in onSliceGetDescendants. The primary changes in this CL are renaming: "DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE" to be more clear the the setting will cannot be accessed on the device, and, adding a new enum to encapsulate settings which are currently unavailable, but could be enabled in the future. Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum. Bug: 78910582 Bug: 79245656 Test: robotests Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-04-20Migrate Settings to androidx.Aurimas Liutikas
Test: make Settings Bug: 76692459 Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-12Switch from SI to IEC unit when formatting data usage bytesFan Zhang
- Created a new helper method DataUsageUtils.formatDataUsage() to format data usage bytes using IEC formatting. - Switch from Formatter.formatFileSize() to DataUsageUtils.formatDataUsage() everywhere in datausage package. Change-Id: I9323beed8bf5126b153fc9a3cdd9591c97ca6fd2 Bug: 76159924 Test: robotests
2018-04-05Merge "Do not use warning or limit to display "X B left" above usage bar" ↵Jan Nordqvist
into pi-dev am: 3f59ce67b6 am: eff9d43739 Change-Id: I8af506c4d7be28f8b5a966f2d4f38aeb13994b85
2018-04-05Do not use warning or limit to display "X B left" above usage barJan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I46f4f5f1cf6092038e49beaafe5aa6a19ffb0aa1
2018-04-05Fall back to Wi-Fi data display in data usage screen with no SIM.Jan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb
2018-04-04Fall back to Wi-Fi data display in data usage screen with no SIM.Jan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb Merged-In: I06bf78e54119819be87e15baca7e5b6a241958cb
2018-03-29Change DataUsageSummaryPreference.setLimitInfo(String text) to take CharSequencevincentpeng
"CharSequence is more correct" than String. Change method to take in CharSequence parameter and modify callers/tests. Bug: b/74960034 Test: RunSettingsRoboTests:DataUsageSummaryPreferenceTest and RunSettingsRoboTests:DataUsageSummaryPreferenceControllerTest Change-Id: Ic83bde57bafff8416c0bd86b1ff2beb44ea12d0e
2018-03-28Entity header: When screen scrolls, there should be shadow under the header.Jan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I5c1d9f463a57d48e258d67602fc4d1fbbdfaad60
2018-03-21Fix entity header to "Hide" shadow of app bar unless scrolled.Jan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I3d23ac49365873361f23b0c7ab105f208d6a7ed7
2018-03-21Only show mobile data usage information when mobile data is enabled.Jan Nordqvist
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I4eb774120cbcf50f40d22c7c8c3caeb0eacbbed3
2018-03-15Merge "Change text for data warning and data limit." into pi-devSundeep Ghuman
2018-03-15Change text for data warning and data limit.Jan Nordqvist
This change modifies the "data warning" text to show either nothing, only warning, only limit, or warning and limit, based on which of the values are set. It also remove the capitalization of the first letter of the texts. Bug: 70950124 Test: manual Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Change-Id: Ifebb411b906719c6e2f343f48d825f7b6f17af53
2018-03-15Set color of update line to red if update is older than six hours.Jan Nordqvist
In Data Usage screen, out-of-date state Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: Icf6fafe9ab61a2c1ac3fba2bebf3bd4407c0ecfe
2018-03-14Change text layout of data usage string.Jan Nordqvist
In Data Usage screen, Above the data bar, Change font size of number In Data Usage screen, Above the data bar, Update text style of “GB used” In Data Usage screen, Above the data bar, Add “GB left” aligned right of bar (not always shown) Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I8accb16425283cf148ddb6b6646f92ff51a74b7c
2018-03-14Fix the ProgressBar in DataUsageSummaryV2 page.Sundeep Ghuman
Bug: 70950124 Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest Change-Id: I83f268c0824d9e3520899725fa572753e1de0814
2018-02-08Update DataUsageSummary to include carrier provided information.Jan Nordqvist
This CL augments the existing data usage display with carrier provided information about data usage and plans when available from the new frameworks API. Test: manual Test: make RunSettingsRoboTests Bug: 70950124 Change-Id: Idde1ff786e8c5dbc04e58ffbcc0fd18789682699