summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/graph
diff options
context:
space:
mode:
authorDoris Ling <dling@google.com>2018-03-28 17:14:23 -0700
committerDoris Ling <dling@google.com>2018-03-29 10:54:54 -0700
commit02b4cf2aca2a9e2de84f54a8b232455a49faa7c1 (patch)
tree96ed8e1a449e1ba9388062f8a244afd10aae9743 /src/com/android/settings/graph
parentcaf72cf3ffe0fa5342412d473d42872f476cdce9 (diff)
downloadpackages_apps_Settings-02b4cf2aca2a9e2de84f54a8b232455a49faa7c1.tar.gz
packages_apps_Settings-02b4cf2aca2a9e2de84f54a8b232455a49faa7c1.tar.bz2
packages_apps_Settings-02b4cf2aca2a9e2de84f54a8b232455a49faa7c1.zip
Report unavailable data usage.
- 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
Diffstat (limited to 'src/com/android/settings/graph')
-rw-r--r--src/com/android/settings/graph/UsageGraph.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/settings/graph/UsageGraph.java b/src/com/android/settings/graph/UsageGraph.java
index a39cb43e27..db13338bc6 100644
--- a/src/com/android/settings/graph/UsageGraph.java
+++ b/src/com/android/settings/graph/UsageGraph.java
@@ -185,6 +185,10 @@ public class UsageGraph extends View {
int x = paths.keyAt(i);
int y = paths.valueAt(i);
if (y == PATH_DELIM) {
+ if (i == 1) {
+ localPaths.put(getX(x+1) - 1, getY(0));
+ continue;
+ }
if (i == paths.size() - 1 && skippedLastPoint) {
// Add back skipped point to complete the path.
localPaths.put(lx, ly);