Commit Graph

19 Commits

Author SHA1 Message Date
Fan Zhang
c63d245779 Catch RejectedExecutionException when loading app data.
Default thread pool from AsyncTask can queue up to a certain number of
tasks. We will use a custom pool with enough queue size to load app
data.

Fixes: 30355247

Change-Id: I5ad4c340191c785463011c1698d1d4625aba44ec
2016-07-26 13:30:04 -07:00
Fan Zhang
2a84bbcddb Don't allow changing data usage setting if uid is not app.
Bug: 30262890

Changing non-app UID's (eg system, firewalld) data usage will just crash.

Change-Id: I1c3f2504aae75f514f962fd54f4dcf240b3bcd81
2016-07-22 10:07:12 -07:00
Jason Monk
3763b581a3 Fix crash in AppDataUsage
Better handling of detecting apps

Change-Id: I15644c8d28f394aeac021af856d0d755d7a986c6
Fixes: 29609311
2016-06-24 10:37:12 -04:00
Zoltan Szatmary-Ban
afea1cae25 Fix non-app non-user preferences in Settings > Data usage
Bug:29466113
Change-Id: Ib7a6d477146a856c0cb9c49143ffbf4fb99e38ed
2016-06-21 12:57:30 +01:00
Jason Monk
9b926c0bc6 Don't allow restricted data usage of system
Cause it will just crash

Change-Id: I4ee43633eb3fa488816b1d2767073cbe404c2c33
Fixes: 28979013
2016-05-27 10:57:10 -04:00
Julia Reynolds
47beeec10b Null check.
Change-Id: I16dfe2cf265b4254aa69bc6165a8f72fc3954d7a
Fixes: 28531037
2016-05-17 16:14:10 -04:00
Jason Monk
f82b3afdd6 Don't crash on non-app data usage
Change-Id: Ib39fc280a892dea2e3e7cbe22339799ab51a6eca
Fixes: 28531037
2016-05-04 13:43:26 -04:00
Jason Monk
bc4e200a59 Don't crash on Settings data usage
Consider Settings uid (SYSTEM_UID) to be an app.

Change-Id: Ia5cc7897eafdf3d654e8a23715bd25502097bab8
Fixes: 28193076
2016-04-29 14:06:10 -04:00
Felipe Leme
85c63f348f Listen to INetworkPolicyManager events and update UI accordingly.
BUG: 27481520

Change-Id: I09c4c586188d754ddd3ac3dcb3903217842ea0a5
2016-04-20 09:17:14 -07:00
Felipe Leme
c2ef27faf4 Handle blacklisted apps on Data Saver whitelist.
When user blacklists an app for background data access, the
"Unrestricted data access" list should not display the whitelist toggle
option, but rather explain background access is turned off and offer the
option to open the app's data usage screen to turn it back on.

It still does not handle changed received by DataSaverBackend, so the UI
will be stale when the user removes a blacklist and navigates back to
the list.

BUG: 27481520

Change-Id: I9d0fa9f0180a69ce9bd1417921bf89ec3ba31f01
2016-04-18 13:14:01 -07:00
Felipe Leme
0628e33bf2 Add metrics for Data Saver actions.
BUG: 28166693
Change-Id: Ie435db66183ef645467ffa6cc7537d54d35cab31
2016-04-14 16:14:55 -07:00
Felipe Leme
2b131e58a7 Merge "Improvements on "App data usage" screen." into nyc-dev 2016-04-14 15:55:18 +00:00
Felipe Leme
4133fc1cb1 Improvements on "App data usage" screen.
- Don't disply whitelist toggle if app is blacklisted.
- Handle scenario where app don't have any quota usage.

BUG: 27481520

Change-Id: I0147025d6bba2d6deeda109aeebb296607550bd8
2016-04-13 15:35:27 -07:00
Nicolas Prevot
cda955072d Show the right icon and label for work profile in data usage.
Previously, it showed the icon and label of a random application.

BUG:26798809
Change-Id: I9d812943bdf6f99e87dfd9bb4a37b25644b8d18d
2016-04-12 20:29:22 +01:00
Jason Monk
3e19fc5600 Move temporary metrics constants to proto
Change-Id: I8fb3ac22df7bdc52039dd640f7696ebd32281f0b
2016-03-08 14:18:30 -05:00
Jason Monk
bd5eabe12e Fix background data setting being backwords
Bug: 27250166
Change-Id: Ia8ef4b0ab860e6c15d972a32c7918b2d54f7743b
2016-02-21 11:53:36 -05:00
Julia Reynolds
fe22e8998b Link to external settings activity from the app header.
Bug: 26288458
Change-Id: Ib7c723f23a09f2dbcb6c9738db8e455fb7b82462
2016-01-29 10:15:31 -05:00
Jason Monk
764f45db91 Add data saver to settings
Bug: 22817899

Change-Id: Ic3055aa6a5baae1653db350313366f180c049cc7
2016-01-25 15:24:29 -05:00
Jason Monk
b37e2887d3 Update data usage UX
Update the UX and dig the data usage screen out of a huge whole of
technical debt.  Switch every to use Preferences rather than standard
layouts and ListViews.

Split data usage into several fragments, all separated.

DataUsageSummary:
 - Shows a summary of the 'default' usage at the top, this will be
   the default sim on phones, or wifi if it has it, or ethernet
   as last attempt to show something.
 - Also has individual categories for each network type that has
   data, cell, wifi, and ethernet. Maybe should look into bt though?

DataUsageList:
- Takes a NetworkTemplate as an input, and can only be reached from
  the network specific categories in DataUsageSummary
- Shows a graph of current usage for that network and links to
  app detail page for any app.
- Has gear link to quick get to billing cycle screen if available

BillingCycleSettings:
 - Just a screen with the cycle day and warning/limits separated
   out from the data usage.

AppDataUsage:
 - App specific data usage details
 - May need some UX iteration given lack of clarity in the spec

Bug: 22459566
Change-Id: I0222d8d7ea7b75a9775207a6026ebbdcce8f5e46
2016-01-19 13:55:26 -05:00