Migrate ColorExtractionService to JobService
IntentService cannot be run in the background, so moving to
JobService prevents us from crashing if the wallpaper is
changed while we aren't running.
Bug: 62065291
Change-Id: Ie0c887e36d0ced43a0b9ab8136bf55eb37697489
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 207a7d4..b5c44bb 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -61,7 +61,6 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Locale;
-import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
@@ -110,6 +109,8 @@
// An intent extra to indicate the horizontal scroll of the wallpaper.
public static final String EXTRA_WALLPAPER_OFFSET = "com.android.launcher3.WALLPAPER_OFFSET";
+ public static final int COLOR_EXTRACTION_JOB_ID = 1;
+
// These values are same as that in {@link AsyncTask}.
private static final int CPU_COUNT = Runtime.getRuntime().availableProcessors();
private static final int CORE_POOL_SIZE = CPU_COUNT + 1;