Commit Graph

19 Commits

Author SHA1 Message Date
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Jeff Sharkey
2fa5c2645e resolve merge conflicts of 071352de9e to master.
Change-Id: Ib777927fd479fcb567d005910930fda7354865d0
2015-10-20 16:04:59 -07:00
Jeff Sharkey
3105ea30d4 Clamp large data usage values.
Without clamping, they can wrap around to negative values and cause
all sorts of havok.  1TB ought to be enough for anyone: that's 3Mbps
for a solid month.

Bug: 24555152
Change-Id: If92c87f9920c3f05cd3ff2cc6630b1bbb65335b8
2015-10-19 16:41:53 -07:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jeff Sharkey
2597625fd9 More storage UI updates.
Storage volumes now have headers with larger fonts and progress bars
to show used versus free space.  Updated Memory to use new formatting
template, and Data Usage to use consistent display logic.

Allocate a unique color for each private volume, and yell when a
volume is running low on space.  Update private volume details to
launch into MediaStore-backed storage backends in a management mode,
and only show detailed items when hosting emulated storage.  Show
details dialog about "Other" and user storage items.

Shortcut into single private volume when it's the only device.  Add
real eject icon.

Bug: 21756698, 20275574, 21326612
Change-Id: If3ecd1d912d3e709c09d3e4da24f368e04dd3f9d
2015-06-15 21:44:21 -07:00
Jeff Sharkey
b654846300 Data Usage, materialized!
Asset drop so Data Usage matches new Material spec.  Removes time
dimension sweeps, so we now summarize the entire visible axis.  Fix
time axis labels to not draw outside clip bounds.  Remove pie chart.

No more checkboxes in menus.  Telephony items like roaming are moved
back to cellular settings.  Start wiring up multi-SIM support.

Bug: 15760500, 16019700, 16289924, 16303795
Change-Id: Ie8f4821962319bb82ff4bc2f13f1f66ba1bdfe65
2014-07-22 16:24:37 -07:00
Kenny Root
7440dde808 Use java.util.Objects instead of internal API
Change-Id: Ib0d797b3e7f2e4f831f52832776b64c0973880b3
2013-12-13 13:28:33 -08:00
Gilles Debunne
a478a1e506 Removed the no longer needed font size span flag fix
Related to bug 6448052

A text replacement (as opposed to a deletion) should (and will) not removei
the EXCLUSIVE_EXCLUSIVE spans that have limits identical to the replaced
range of charcters.

Change-Id: Iefaeab9e5119e7223ef6800c55ff0c741976e138
2012-05-04 16:26:11 -07:00
Gilles Debunne
58a904ad2e Data usage limit label font size fixed
Bug 6326750

The font size around the text was removed when its content is replaced.
This is WAI since the spans created from <font> html tags have a
SPAN_EXCLUSIVE_EXCLUSIVE flag. These are removed when their length
becomes 0. The bug came from a recent enforcement of this constraint.

The fix is to change the flags of these AbsoluteSizeSpan spans.

This CL also changes the code to avoid the creation of the int[] array.

Change-Id: Ib58270bb9d1cf0c7609ba1e36d6c0cca841300db
2012-04-17 18:39:26 -07:00
Jeff Sharkey
76c5ed4f35 Migrate to @Override to remove warnings.
Bug: 6303344

Change-Id: I8f17edc3b12d50cedab2c5f555c63bc07d85bca2
2012-04-09 10:57:29 -07:00
Jeff Sharkey
a8106f248c Auto grid lines, lower minimum, disable estimates.
Show automatic grid lines with power-of-two spacing, avoiding ANR
when trying to render thousands of gridlines.  Lower minimum chart
height to 50MB to give better view of linear data.  Also disable
estimates rendering.

Bug: 5500204, 6005240
Change-Id: Iacfed11b32c0095c9c2d08bee6a1b5e29637de98
2012-03-15 18:38:36 -07:00
Jeff Sharkey
f3871fb2b2 Linear bytes scale, time ticks on first week day.
Move bytes to linear instead of logarithmic scale.  Also render time
ticks on first week day based on locale.  Also enable testing of
specific IMSI through setprop.

Bug: 5452612, 5829693
Change-Id: I13200cf58a39bfe0ac343e1f83165e899867641b
2012-02-03 19:29:15 -08:00
Jeff Sharkey
77dae91726 Unify shorthand for byte-based units.
Change-Id: I32f998b5ee1f5416c9cceafd124fd34b7433be42
2012-02-03 14:50:33 -08:00
Jeff Sharkey
461842a8c0 Data usage strings, sweep touches, fixes.
Change strings around limiting background data.  Move limit/warning
sweeps above inspection sweeps, and teach about additional neighbors
on different axis.

Guard against DialogFragment.show(), fix pie chart to draw edges, and
remove data usage from battery UI.

Bug: 5341374, 5337650, 5337385, 5319465, 5236335
Change-Id: Iea8c2a2ab405b645d85abe34a0178d4b8874cdd5
2011-09-25 18:41:13 -07:00
Jeff Sharkey
a53188fe5a Data usage: precise editing, restrict help, D-pad.
Introduce dialogs for precise editing of network policy warning/limit
values, triggered by click on sweep labels.  Show up to 999MB before
rounding to GB, and round to nearest 5MB value when dragging.  Partial
D-pad navigation around chart controls.  Fix jumping when relayout
during drag, and fix sweep overlap bug.

When restricting data without limited networks, show dialog help to
guide user towards network limit.  When reloading chart data, try
restoring to nearest cycle.

Bug: 5289641, 5111701, 5226078
Change-Id: Ic59dee6496c480a64dc56f8534acf4d81b50bca7
2011-09-13 20:24:14 -07:00
Jeff Sharkey
b98c55bd09 Data usage performance, bugfixes.
Optimize launch times by removing unneeded extra work, including
reloading data and tightening chart invalidation.  Fix invalidation
storm when sweeps overlap.  Move chart history into loader instead of
blocking main thread.

Disable "Split 4G" mode until telephony support is ready, and combine
any existing split policies.

Async loading of application details.  Remove alpha transitions to
speed up on some hardware.  Hide menus in detail mode.  Delay kicking
off force-poll.  Fix inset padding on large devices.

Bug: 5284321, 5273918, 5263056
Change-Id: I746d79c05e2a6ea97bbdbdc5d807e208328d1373
2011-09-12 15:48:24 -07:00
Jeff Sharkey
5d70679c02 Larger touch targets, snap to persisted value.
Extend ListView content to screen edges, and use InsetBoundsDrawable
to draw separator and divider with expected padding.  Sweep touch
targets are now much larger.

Snap sweep to persisted value, and fix NFE when parsing label value.

Bug: 5274249
Bug: 5262865
Bug: 5242857
Change-Id: Ifa0f3e622767d5b4dc85a73d6340207e6038a429
2011-09-08 19:02:31 -07:00
Jeff Sharkey
28130d9638 Unify data/power layout, confirm disable, round.
Share consistent layout between data usage and battery usage.  Show
confirmation dialog before disabling mobile data.  Round warning/limit
sweep values to match displayed label.  Suppress fade when switching
data usage tabs.

Bug: 5208510, 5058157, 5038589, 5252816
Change-Id: I3c76f3397445d2d3b173666a41672871df4c61af
2011-09-02 16:15:25 -07:00
Jeff Sharkey
55d18a57e4 Data usage UI fixes; sweeps, combined history.
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
2011-08-28 16:34:25 -07:00