Commit Graph

3 Commits

Author SHA1 Message Date
Rajeev Kumar
9d854ef36f Recycle TypedArray in UsageView.
Test: make RunSettingsRoboTests -j40
Change-Id: I8bcc40678d4cc493297b09cd5635c5342c969096
2017-07-13 19:31:42 -07:00
Alex Kulesza
c57ceaaa8c Implement general projection curve support for UsageGraph.
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
2017-06-08 16:59:14 +00:00
Alex Kulesza
c661098ab8 Move UsageGraph from SettingsLib to Settings.
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
2017-06-05 15:43:18 -04:00