Update job ids in Settings

Use constant integers instead of ids

Bug: 77331929
Test: RunSettingsRoboTests
Change-Id: Ic6def54aaae4a9ba025161340f1cee210cb2e87f
This commit is contained in:
Lei Yu
2018-03-30 13:20:53 -07:00
parent f3789adffd
commit d4482339d5
8 changed files with 28 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ public class AnomalyCleanupJobService extends JobService {
final ComponentName component = new ComponentName(context, AnomalyCleanupJobService.class);
final JobInfo.Builder jobBuilder =
new JobInfo.Builder(R.id.job_anomaly_clean_up, component)
new JobInfo.Builder(R.integer.job_anomaly_clean_up, component)
.setPeriodic(CLEAN_UP_FREQUENCY_MS)
.setRequiresDeviceIdle(true)
.setRequiresCharging(true);

View File

@@ -52,7 +52,7 @@ public class AnomalyConfigJobService extends JobService {
final ComponentName component = new ComponentName(context, AnomalyConfigJobService.class);
final JobInfo.Builder jobBuilder =
new JobInfo.Builder(R.id.job_anomaly_config_update, component)
new JobInfo.Builder(R.integer.job_anomaly_config_update, component)
.setPeriodic(CONFIG_UPDATE_FREQUENCY_MS)
.setRequiresDeviceIdle(true)
.setRequiresCharging(true);

View File

@@ -70,7 +70,7 @@ public class AnomalyDetectionJobService extends JobService {
final ComponentName component = new ComponentName(context,
AnomalyDetectionJobService.class);
final JobInfo.Builder jobBuilder =
new JobInfo.Builder(R.id.job_anomaly_detection, component)
new JobInfo.Builder(R.integer.job_anomaly_detection, component)
.setOverrideDeadline(MAX_DELAY_MS);
if (jobScheduler.enqueue(jobBuilder.build(), new JobWorkItem(intent))