From d754ea24e5fd722860aeab6391af397b07b8115d Mon Sep 17 00:00:00 2001 From: wangqi Date: Wed, 22 Nov 2017 11:43:04 -0800 Subject: Add SpamJobType for all spam job IDs. Bug: 69556012 Test: SpamJobSchedulerTest PiperOrigin-RevId: 176683042 Change-Id: I2807510e3c511c1672ed2c49117ad03b92c4cee5 --- java/com/android/dialer/constants/ScheduledJobIds.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java') diff --git a/java/com/android/dialer/constants/ScheduledJobIds.java b/java/com/android/dialer/constants/ScheduledJobIds.java index 3fcbb0c2e..c0835b261 100644 --- a/java/com/android/dialer/constants/ScheduledJobIds.java +++ b/java/com/android/dialer/constants/ScheduledJobIds.java @@ -16,16 +16,27 @@ package com.android.dialer.constants; +import android.support.annotation.IntDef; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + /** * Registry of scheduled job ids used by the dialer UID. * *

Any dialer jobs which use the android JobScheduler should register their IDs here, to avoid * the same ID accidentally being reused. + * + *

Do not change any existing IDs. */ public final class ScheduledJobIds { public static final int SPAM_JOB_WIFI = 50; public static final int SPAM_JOB_ANY_NETWORK = 51; + /** Spam job type including all spam job IDs. */ + @Retention(RetentionPolicy.SOURCE) + @IntDef({SPAM_JOB_WIFI, SPAM_JOB_ANY_NETWORK}) + public @interface SpamJobType {} + // This job refreshes dynamic launcher shortcuts. public static final int SHORTCUT_PERIODIC_JOB = 100; -- cgit v1.2.3