Commit Graph

20 Commits

Author SHA1 Message Date
Jeff Sharkey
4e2d16cdc0 Offer to "merge" subscribers for data usage.
When picking a template to use for querying statistics and setting
policies, normalize it so we widen the template to cover any merged
subscribers.

Also remove some code related to long-dormant split policies.

Bug: 18012787
Change-Id: I1e07dc09016df21ecfd7b3fad49759fa57570391
2014-12-08 08:42:12 -08:00
Behrooz Aliabadi
524dee0fb5 Fix null pointer exceptions in NetworkPolicyEditor
This upload fixes a null pointer exception issue.
After this fix the modified methods return
their corresponding default values instead of null.

Change-Id: Idb94f8b808b8dd18be5e3fc92cc5560ce0f81c4f
2013-12-18 09:55:45 +00:00
Kenny Root
7440dde808 Use java.util.Objects instead of internal API
Change-Id: Ib0d797b3e7f2e4f831f52832776b64c0973880b3
2013-12-13 13:28:33 -08:00
Jeff Sharkey
d54d34557a One final pass at unquoted NetworkPolicies.
Correctly shows the metered status of legacy policies in UI.

Bug: 7695807
Change-Id: I13c9f4c1716d8457343c41433afac0b5f00e02fe
2012-12-18 18:07:31 -08:00
Jeff Sharkey
53f2855808 Clean up oddly quoted NetworkPolicies.
Bug: 7695807
Change-Id: Ia3f04dc3e918d6ca4af62f263a9c90273b3485ff
2012-12-18 17:32:10 -08:00
Jeff Sharkey
bf60154a45 Leave unmetered Wi-Fi network policies intact.
They are now removed when the WifiConfiguration is deleted.

Bug: 6344821, 6369307
Change-Id: Id411fa06cec10435501ef03c56d0bcb96ed229db
2012-04-19 23:02:09 -07:00
Jeff Sharkey
313f7d8c57 Controls to set expensive (metered) networks.
Add UI to change metered flag on NetworkPolicy, and support Wi-Fi
policies per-SSID.  Create Wi-Fi policies as needed, but leave cycle
undefined.

Only show and mutate mobile policies when SIM state is ready.

Bug: 3001465, 3291052
Change-Id: I481a202fe0e68fc2f5adfd3b3a6f40347d2b168c
2012-04-05 14:31:43 -07:00
Jeff Sharkey
012c16b62c Remember when NetworkPolicy was inferred.
Change-Id: If2e8ba37fa166e1711650b87392af2ac3a418269
2012-03-20 16:52:43 -07:00
Jeff Sharkey
e5223a0577 Save timezone when setting data cycle reset date.
Bug: 5938567
Change-Id: I9df8da9d030169952098efc04cfde79e3e42e1f8
2012-03-09 18:24:01 -08:00
Jeff Sharkey
0d750bba7d Update for NetworkPolicy refactoring.
Bug: 5262414
Change-Id: I17db862cc20a11f022dc2d02993ad52988618681
2012-02-02 16:12:00 -08:00
Jeff Sharkey
3038c52de4 Restrict app data on metered networks.
Paired with framework change that no longer requires NetworkPolicy
to have limit when restricting apps.

Bug: 5571454
Change-Id: I2a5d8446a9278afb183e13d0f41f436ccb3bc9e8
2011-12-15 14:03:37 -08: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
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
Jeff Sharkey
131f9d6e0f Allow data usage policy on Wi-Fi networks.
Create NetworkPolicy when it doesn't already exist.

Bug: 4646471, 5085110
Change-Id: I38b8b03689710df06d1734a4b4d9e12d98794154
2011-08-18 12:01:29 -07:00
Jeff Sharkey
30dde0f5a0 Reinforce limited networks in data usage UI.
When restricting background data, list the networks the restriction
applies to.

Bug: 5131685, 5058106
Change-Id: Idde084dfa5ac6313a8d145cb6f2603aedb154590
2011-08-18 12:01:15 -07:00
Jeff Sharkey
271ec8a8f8 Move data over-limit dialog, reset policy snooze.
Moved over-limit dialog to SystemUI, and followed Intent changes
to read full NetworkTemplate.  When mutating NetworkPolicy, always
reset any snooze.

Bug: 5057979, 4723336
Change-Id: I9a975eb4ced2f4020c2fe74af67625541cbfcd85
2011-07-27 09:31:51 -07:00
Jeff Sharkey
9549e9f377 More data usage radio combinations, testing.
Offer Ethernet data when present, and better handling of devices
with various radio combinations.  Include "setprop" to help testing
in future.

Adopt new NetworkTemplate building in framework, and avoid crash
when AsyncTask finishes after Fragment is removed.

Bug: 5026016, 5029874
Change-Id: Ib7ab501d0111b9860a91c248193919663d47f2a2
2011-07-14 20:43:30 -07:00
Jeff Sharkey
f54f435f1f More data usage chart iteration, app details.
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
2011-06-23 22:30:05 -07:00
Jeff Sharkey
a662e4975b NetworkTemplate refactoring for data stats.
To match framework changes.

Change-Id: I0f648ae5753149f9774c8096540834451ba41279
2011-06-18 22:22:29 -07:00