diff options
author | Simon Shields <keepcalm444@gmail.com> | 2016-12-29 12:18:54 +1100 |
---|---|---|
committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-12-31 14:28:14 +0000 |
commit | ed584932ca159e2e49add95f766cb743bf84a960 (patch) | |
tree | de15a58a254a4d3989bff6bcb7b8f9890e277510 /src | |
parent | 39de418560fc3d9ea9238aca19303d94c33cdeeb (diff) | |
download | packages_apps_Settings-ed584932ca159e2e49add95f766cb743bf84a960.zip packages_apps_Settings-ed584932ca159e2e49add95f766cb743bf84a960.tar.gz packages_apps_Settings-ed584932ca159e2e49add95f766cb743bf84a960.tar.bz2 |
Settings: CMStats: Upload stats only if user has not opted out
Change-Id: If4cd7a2c1cee23e63d6191fbdff08c2219f8b8bc
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/cmstats/StatsUploadJobService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/settings/cmstats/StatsUploadJobService.java b/src/com/android/settings/cmstats/StatsUploadJobService.java index c4b69ff..4533e28 100644 --- a/src/com/android/settings/cmstats/StatsUploadJobService.java +++ b/src/com/android/settings/cmstats/StatsUploadJobService.java @@ -64,6 +64,11 @@ public class StatsUploadJobService extends JobService { public boolean onStartJob(JobParameters jobParameters) { if (DEBUG) Log.d(TAG, "onStartJob() called with " + "jobParameters = [" + jobParameters + "]"); + + if (!Utilities.isStatsCollectionEnabled(this)) { + return false; + } + final StatsUploadTask uploadTask = new StatsUploadTask(jobParameters); mCurrentJobs.put(jobParameters, uploadTask); uploadTask.execute((Void) null); |