summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2016-12-29 12:18:54 +1100
committerZhao Wei Liew <zhaoweiliew@gmail.com>2016-12-31 14:28:14 +0000
commited584932ca159e2e49add95f766cb743bf84a960 (patch)
treede15a58a254a4d3989bff6bcb7b8f9890e277510
parent39de418560fc3d9ea9238aca19303d94c33cdeeb (diff)
downloadpackages_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
-rw-r--r--src/com/android/settings/cmstats/StatsUploadJobService.java5
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);