1. Add missing lines within file DataUsageList. (Which might lead to
crash in some cases)
2. Change the naming based on comments within ag/17226775
Bug: 227266811
Test: robotest ChartDataUsagePreferenceTest DataUsageListTest
Change-Id: I4cde5a04befd058c2a1a3aa30826caa5b479b69f
Showing a usage graph before end of statistic would lead to incorrect
height of usage graph, and another update would lead to layout moved a
little bit.
This change tries to improve it through:
1. Start the loading animation earlier, and stop animation when
statistics loaded.
(Only effective when UI re-create.)
2. Update the UI only when statistics are ready.
Bug: 187019210
Test: robotest ChartDataUsagePreferenceTest DataUsageListTest
Change-Id: Ic83f2422b6c6d55948110d652ee24234f43b6445
1. Set null content description for all labels of the chart.
2. Set 2 parts in the content description of the chart:
I. Brief description of the chart.
II. Stats of the data usage.
Bug: 141093026
Test: ChartDataUsagePreferenceTest
Manually listen to TalkBack speaking
Change-Id: I82cefd9987793f40a5bba5bf3ea5f4017da37640
- the new data usage api returns buckets for future date with 0 usage.
When we plot the data usage chart, need to check the bucket date to make
sure we only plot points up to the current date.
Change-Id: I50e161ca9cdbb30c8fda8f6cdd24c993b546ad0d
Fixes: 120490567
Test: make RunSettingsRoboTests
- remove all v1 code and the corresponding feature flag switch.
Bug: 117420679
Test: make RunSettingsRoboTests
Change-Id: Ib062c03c671b0f860698f5e5e153ab46d963175a
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
- 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
Update Utils.getColorAttr and similar methods in Utils to return a ColorStateList instead of a color
Bug: 74872054
Test: Force to display different color items then manually test
Change-Id: If002f9a578558e6254220c36ef556e8378d4522a
- when showing the data usage graph, if the first data point is equal to
the first available data, insert a 0 usage point on the first day of
available data, so that it will show a flat line for the days that do
not have available data instead of showing a non-zero slope.
Change-Id: Ibf305e292a65ab3310ea12efbb575e3a7e1b6012
Fixes: 76155147
Test: make RunSettingsRoboTests
Previously, projections were hard-coded in UsageGraph as lines from the
last known point to the corner of the graph. This change replaces that
with support for arbitrary projection curves. Logic for hiding/showing
the projection is now gone; if the client does not want a projection,
it simply does not supply one.
There are two active clients of this code: the data usage graph and the
battery usage graph. The data graph does not use projections and is
essentially unchanged. The battery graph now implements its linear
extrapolation directly in BatteryInfo.
Bug: 38400320
Test: make SettingsUnitTests SettingsGoogleUnitTests
Test: manual (screenshots in comments)
Change-Id: I754e66f6b18ecb8b936143399f8e9e3368fc1ce4
In preparation for modifying the graph code to show detailed projections
(see bug), this change moves it into Settings along with related tests
and resources.
Bug: 38400320
Test: manual, make SettingsUnitTests, make SettingsGoogleUnitTests
Change-Id: I88e5336c15827727b3427e29b10954bba9cfba7d
- Fix int conversion (evidently a month doesn't fit in an int
- Remove gaps because they don't make sense for data usage
Bug: 27632250
Change-Id: I87c2c05960b6ee489289e94eb12de9d52de1f3aa
Update the UX and dig the data usage screen out of a huge whole of
technical debt. Switch every to use Preferences rather than standard
layouts and ListViews.
Split data usage into several fragments, all separated.
DataUsageSummary:
- Shows a summary of the 'default' usage at the top, this will be
the default sim on phones, or wifi if it has it, or ethernet
as last attempt to show something.
- Also has individual categories for each network type that has
data, cell, wifi, and ethernet. Maybe should look into bt though?
DataUsageList:
- Takes a NetworkTemplate as an input, and can only be reached from
the network specific categories in DataUsageSummary
- Shows a graph of current usage for that network and links to
app detail page for any app.
- Has gear link to quick get to billing cycle screen if available
BillingCycleSettings:
- Just a screen with the cycle day and warning/limits separated
out from the data usage.
AppDataUsage:
- App specific data usage details
- May need some UX iteration given lack of clarity in the spec
Bug: 22459566
Change-Id: I0222d8d7ea7b75a9775207a6026ebbdcce8f5e46