summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/widget/DataUsageChartView.java
Commit message (Collapse)AuthorAgeFilesLines
* Data usage UI fixes; sweeps, combined history.Jeff Sharkey2011-08-281-542/+0
| | | | | | | | | | | | | | | | | | | | | Fix sweep z-order so that limit are always above inspection range, and draw shadows behind sweep labels. Narrower margins for sweeps with labels; push labels to keep from overlapping. Generous touch targets on sweeps, and delegate touches to neighboring sweep if nearer. Refresh sweep layout during axis zoom, and don't allow zoom below default minimum. Let inspection sweeps move beyond valid data ranges. Draw less-frequent tick marks when working with large axis ranges. Remove Wi-Fi policies but continue showing historical data. Write NetworkPolicy if modified during read, and snapshot when async write requested. Handle combined UID histories for "Android OS." Bug: 5191421, 5092579, 5225988, 5221101, 5221065, 5221005, 5150906, 5058025 Change-Id: Id51652e8a10bb90e1345f7a8af01bd70cb8ac677
* Foreground/background network stats pie chart.Jeff Sharkey2011-08-151-3/+0
| | | | | | | | | | | | Load foreground/background network stats, showing combined in chart series, and also separated in pie chart. Padding to match spec, updated action bar tabs, and limit width for wide devices. Also clear UI options for requesting fragments. Move to action bar overflow menu instead of custom icon. Show detail chart data outside current inspection range. Bug: 5106163, 5143670, 5163064, 5162671, 5148713, 5129036, 5096626 Change-Id: I548fef209e1f714f70ee6bf7098dbdb881692df4
* Data usage app icons and details, chart labels.Jeff Sharkey2011-08-041-0/+1
| | | | | | | | | Add app icons into both summary list and details pane. Also show list of all applications merged under a UID. Draw dates on chart axis, and avoid flashing policy sweeps when switching networks in detail mode. Bug: 5087283, 5038812 Change-Id: I1dcd03ca85b517f8726452af8a46b4be9b3d20f1
* Data usage axis grow/shrink, other fixes.Jeff Sharkey2011-08-011-44/+167
| | | | | | | | | | | | | | | | When dragging vertical sweeps near edges, grow or shrink axis scale to give users access to larger limits. Triggers 10% for each 250ms that user continues holding. Change axis math to support arbitrary ranges beyond [0,5GB]. Show "empty" message when no application details found. Added strings that didn't appear in default language. Better sweep margins using dip instead of scale units. Format time ranges in local time instead of UTC. Only show dashed estimate when it would reach near warning or limit. Extend app usage series until "now" when buckets missing. Bug: 5096685, 5092538, 5058158, 5058114, 5058024, 4643457 Change-Id: I45cf33f7f3baeba1bfa5b21f31cb0a12006f62fa
* Data usage fit and finish.Jeff Sharkey2011-07-271-18/+33
| | | | | | | | | | | | | | | | | | Show time range and data summary based on current sweep selection for both network and app details. Fix animations by opting-out of parent hierarchy animation, since it fights with ListView. Switch to using NPMS "restrict background" instead of overloading setBackgroundDataSetting(), and hide app background checkbox when global background is restricted. Limit sweeps to valid historical data, and activate sweeps on touch instead of requiring separate tap. Fix z-order and avoid animating sweeps. Align all elements along vertical edge, and fix item layout to handle long app title. Bug: 4979025, 5058107, 5038590, 5079887, 5058108, 5058026, 5037381 Change-Id: Ib45b61ff2a62303f47aa3f47f88d2e688fe4d076
* Data usage app labels and system clustering.Jeff Sharkey2011-07-121-8/+6
| | | | | | | | | Cluster all non-applications under single "Android OS" label, and correctly label uninstalled applications. Match API changes that now return correct historical usage around current time. Bug: 4975314, 4691901 Change-Id: Icec1c54ff3404e1525878516b0a438f757dcb758
* Prevent data usage chart sweeps from crossing.Jeff Sharkey2011-07-101-0/+6
| | | | | | | | Add rules to clamp sweeps, since it doesn't make sense to have a limit below warning. Bug: 4598462 Change-Id: I3323c7bca7fabe3e3f1e9c89906c3a921103579c
* Draw vertical data usage sweep labels.Jeff Sharkey2011-07-091-17/+44
| | | | | | | | | Using template string, ask axis to build label for sweeps. Also clean up margins exposed to parent view, since we offset when label is larger than sweep drawable. Bug: 4598460 Change-Id: If71bc8ec8c952023325c80b9bc00b63c23609c7a
* Fix animation bugs, stop disabled sweep touches.Jeff Sharkey2011-06-241-28/+24
| | | | | | | | | | | Change sweep drawables to crossfade correctly between states, and work around 4946591 by nesting container one level deeper. Also wait until first layout pass is finished before applying LayoutTransition. Prevent touches from reaching sweeps when chart is disabled. Also bring back log scale for data. Change-Id: I2194714ab075fd32525681119f30427c1b96fc50
* More data usage chart iteration, app details.Jeff Sharkey2011-06-231-29/+28
| | | | | | | | | | | Moved app details back into single Fragment to support animations and template tabs. Show the network in background behind app details chart series to match designs. Clamping sweeps at axis boundaries. Bug: 4813014, 4598460, 4818029 Change-Id: I72c0b21ee1d595e4da31d293ae0dab9e801041f3
* Iterate on data usage chart UI.Jeff Sharkey2011-06-231-53/+112
| | | | | | | | | | | | Switched to inflating chart views from XML, using attributes for configuration. Start using drawable assets for chart components instead of manually painting. Include hand-cut assets, and animate between states when touched to invoke. Clamp sweeps to valid chart ranges and prepare for sweep labels. Bug: 4768483, 4598460 Change-Id: Ic660c35bec826eb5e3f6a1dde3cc04d8c437ef2b
* Cycle day editor and other confirmation dialogs.Jeff Sharkey2011-06-141-0/+3
| | | | | | | Create dialog to edit "cycle day" when data usage resets. Also added dialogs to confirm enabling limit and restricting an application. Change-Id: I1e08b17fabd1fcfc2f260807a61435d0ff1a8627
* First pass at detailed app data usage, policy.Jeff Sharkey2011-06-131-0/+7
| | | | | | | | | Fragment to show application data usage details, including chart with inspection ranges. Button that invokes ACTION_MANAGE_NETWORK_USAGE towards application, and UID-specific policy controls. Fragment is launched when clicking list items from data usage summary page. Change-Id: Ie1564aa8af98e1a7083817a997059a5a7b1caa50
* Modifier to combine/split mobile network policy.Jeff Sharkey2011-06-121-3/+38
| | | | | | | | Create NetworkPolicyModifier which knows about which mobile network policies can coexist. Settings UI uses this modifier to drive UI and persist policies. Change-Id: Ib3f3841b0a74c14eefb99209dd644a2e7b7e525d
* Iterating on data usage; tabs, scrolling, cycles.Jeff Sharkey2011-06-101-0/+276
Added ActionBar items to control complexity of data surfaced; checked state causes tabs to be shown/hidden for "Mobile", "2G-3G", "4G", and "Wi-Fi" network templates. Loading historical stats and policy from system services based on selected tab. Change entire body under tabs to scroll, treating network options and chart as ListView headers. Teach chart sweep to disable intercept to play with ListView, and draw sweep disabled as dashed line. Hijacking Preference views for toggles to offer consistency. No policy updates are persisted yet. Based on available historical network stats and policy cycle reset day, build list of user-selectable cycles. Wired up chart to display cycle data and reset inspection region to last week of available data. Change-Id: Ia561578276fa23908b745fbc06a6ef828d9ccc2e