summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-06-22 19:21:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-06-22 19:21:23 +0000
commitf3b1c0f7599f9b7575782f90235810266593ccf8 (patch)
tree1df18cdedaaa48055ff9fd7e64a4e33999be25a8
parent12461a16c9afed84418d2863bdf00ea512fbeab7 (diff)
parent46d73d69f06baf24523abdc1f6d2bbd313e89240 (diff)
downloadandroid_packages_apps_Trebuchet-f3b1c0f7599f9b7575782f90235810266593ccf8.tar.gz
android_packages_apps_Trebuchet-f3b1c0f7599f9b7575782f90235810266593ccf8.tar.bz2
android_packages_apps_Trebuchet-f3b1c0f7599f9b7575782f90235810266593ccf8.zip
Merge "Disable old ColorExtractionService if feature flag for LAUNCHER3_GRADIENT_ALL_APPS is enabled" into ub-launcher3-dorval-polish
-rw-r--r--src/com/android/launcher3/dynamicui/ExtractionUtils.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/dynamicui/ExtractionUtils.java b/src/com/android/launcher3/dynamicui/ExtractionUtils.java
index 92cb5dc08..cc0e0bed1 100644
--- a/src/com/android/launcher3/dynamicui/ExtractionUtils.java
+++ b/src/com/android/launcher3/dynamicui/ExtractionUtils.java
@@ -29,6 +29,7 @@ import android.support.v4.graphics.ColorUtils;
import android.support.v7.graphics.Palette;
import com.android.launcher3.Utilities;
+import com.android.launcher3.config.FeatureFlags;
import java.util.List;
@@ -47,6 +48,9 @@ public class ExtractionUtils {
* Launcher will be notified in Launcher#onSettingsChanged(String, String).
*/
public static void startColorExtractionServiceIfNecessary(final Context context) {
+ if (FeatureFlags.LAUNCHER3_GRADIENT_ALL_APPS) {
+ return;
+ }
// Run on a background thread, since the service is asynchronous anyway.
Utilities.THREAD_POOL_EXECUTOR.execute(new Runnable() {
@Override
@@ -60,6 +64,9 @@ public class ExtractionUtils {
/** Starts the {@link ColorExtractionService} without checking the wallpaper id */
public static void startColorExtractionService(Context context) {
+ if (FeatureFlags.LAUNCHER3_GRADIENT_ALL_APPS) {
+ return;
+ }
JobScheduler jobScheduler = (JobScheduler) context.getSystemService(
Context.JOB_SCHEDULER_SERVICE);
jobScheduler.schedule(new JobInfo.Builder(Utilities.COLOR_EXTRACTION_JOB_ID,