Commit Graph

34 Commits

Author SHA1 Message Date
Amith Yamasani
b0b0b110c0 Use circular avatars wherever appropriate
Battery stats, Data usage and Running apps

Change-Id: Ib7f851e55ef7e44f18d3f8a2cd27f5f2204b0145
2013-05-13 16:01:20 -07: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
a66c0ab094 Fix metered SSID matching regression.
WifiInfo changed to return SSIDs with quotes included, so relax our
identity matching to accept matches regardless of quotedness.

Bug: 7695807
Change-Id: I53c0361f9e44b4d47ec8764991a3cd545c253edd
2012-12-18 17:06:23 -08:00
Jeff Sharkey
6bf72119fd Update string to reflect removed users.
Bug: 7194784
Change-Id: Ied3b4376d0ad664c61a5d3388fe24bc96c6ee466
2012-09-19 15:26:12 -07:00
Jeff Sharkey
8882ccdd3e Load user photos through system_server.
Bug: 7194137
Change-Id: Ie36ca40c48fb06d55d120bfcf3db69aea9d83829
2012-09-19 11:16:24 -07:00
Jeff Sharkey
38305fb177 Data usage multi-user support.
Switch to storing policy per-user instead of per-app, meaning each
user has control over their own set of apps.  Summarize the usage of
non-current users.  Only allow owner to make changes to overall
network policy.

Hide auto-sync menu when viewing app details.  Search for
MANAGE_NETWORK_USAGE intent across all package names sharing a UID.

Bug: 7121279, 5419594, 6978663
Change-Id: Ia70f04df70d27da27faccb947cd27021c628a41a
2012-09-14 22:43:51 -07:00
Jeff Sharkey
d878909980 Surface metered networks as "Mobile hotspots."
String changes to give clearer definition of metered networks, and
remove metered control for mobile network.  Also fix NPE when testing
hasEthernet() before session is ready.

Bug: 6494976
Change-Id: Ia55ca3362a05977b9f21ab41eb10bbc738e29620
2012-05-29 11:03:55 -07:00
Jeff Sharkey
37c222fdf0 Better messaging when Wi-Fi disabled.
Bug: 6443166
Change-Id: I262e559e5c209d3f1959d5d2ab9a2aebb8180c59
2012-05-04 10:26:58 -07:00
Jeff Sharkey
34e964dcff Hide tab when disabled, metered strings, fixes.
Hide "Data usage" item when kernel support isn't available and
enabled.  Change "restrict background" strings to reflect metered
status.  Hide app settings button when no package found.  Always
start limit sweep above any warning.  Imply metered state for
networks with limits.

Bug: 6303364, 5465643, 5379686, 6376276, 6368329, 6376276
Change-Id: I4faccc9a50f2f741fd937bb8c361a3ca055135e2
2012-04-21 15:41:48 -07: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
e557c3349e Show data restricted apps, unify strings.
Always show apps with background data restricted, even when not
used in selected time period.  Combine measurement disclaimer into
single string, and only show for mobile networks.  Unify limit
dialog string.

Bug: 6007276, 5505010, 5495020, 5456087
Change-Id: I0ec307b330838dc9528d7e63e0ac1edd14ba122c
2012-04-13 19:45:02 -07:00
Jeff Sharkey
08ce99e224 Move to INetworkStatsSession with lifecycle.
Explicitly communicate lifecycle, enabling system_server to cache
stats when actively being used.

Bug: 6236498
Change-Id: Ieecc4b1d4fd46aeb5207c4ba9b450e04e9438d00
2012-04-06 11:47:25 -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
ef6e1ff728 Cluster apps by user in Data Usage.
When displaying apps that have used data, cluster all app usage
together regardless of profile/user.  Always persist policy rules
using primary UID (the UID under the default user).

Bug: 6140462
Change-Id: Ia00bb42b26987553926f4027583dbe03b3bafba1
2012-03-22 11:10:45 -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
ae30d12a5f Tighten locking around data usage UID resolution.
Bug: 5965853
Change-Id: I92231ca938ddf320377c437c7379a03319c88aca
2012-02-03 15:48:28 -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
bdf98e84ab Data usage label width, locking, Wi-Fi fixes.
Avoid wrapping sweep labels when underlying string is long, and avoid
showing blank "^1" sweep labels.  Only offer "restrict data" when
mobile networks are present.  Add locking around UidDetailProvider.

Move to isNetworkSupported() for consistency.

Bug: 5492495, 5471602, 5439402, 5373465
Change-Id: I79f5938d45ffbb4c2c242106424a466042a26c1c
2011-11-10 17:17:24 -08:00
Jeff Sharkey
a83a24f48a Surface tethering stats in data usage.
Bug: 5244846
Change-Id: Ib4ac03ab634278714576a66ef8d6fdbc6d15c82a
2011-09-16 18:28:39 -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
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
398b18fca7 Force poll on data usage launch.
When lauching data usage, force NetworkStatsService poll to update
with recent data.  Also move UID summary data to Loader pattern.

Bug: 4515856
Change-Id: Ia8c70d8d0c863da3b8e956e4066d4f69fba30473
2011-07-10 18:56:48 -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
Jeff Sharkey
4c72ae5e3d Cycle day editor and other confirmation dialogs.
Create dialog to edit "cycle day" when data usage resets.  Also added
dialogs to confirm enabling limit and restricting an application.

Change-Id: I1e08b17fabd1fcfc2f260807a61435d0ff1a8627
2011-06-14 16:32:06 -07:00
Jeff Sharkey
05cc0cc4a6 Modifier to combine/split mobile network policy.
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
2011-06-12 23:11:40 -07:00