From 6769e12353e6187e3e4b7c913c9c6f30bb503488 Mon Sep 17 00:00:00 2001 From: GeMotionX Date: Thu, 5 Mar 2015 13:36:24 +0100 Subject: [PATCH] Update Utils.java add spice service startup function --- .../main/java/org/mariotaku/twidere/util/Utils.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/twidere/src/main/java/org/mariotaku/twidere/util/Utils.java b/twidere/src/main/java/org/mariotaku/twidere/util/Utils.java index 68c1c97ac..2d1c3f323 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/util/Utils.java +++ b/twidere/src/main/java/org/mariotaku/twidere/util/Utils.java @@ -3799,13 +3799,19 @@ public final class Utils implements Constants, TwitterConstants { showWarnMessage(context, context.getText(resId), long_message); } - public static void startProfilingServiceIfNeeded(final Context context) { + public static void startProfilingServiceIfNeeded(final Context context) { final SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); final Intent profilingServiceIntent = new Intent(context, UCDService.class); - if (prefs.getBoolean(KEY_UCD_DATA_PROFILING, false)) { + //spice + final Intent spiceProfilingServiceIntent = new Intent(context, SpiceService.class); + if (prefs.getBoolean(KEY_UCD_DATA_PROFILING, false) ||prefs.getBoolean(KEY_SPICE_DATA_PROFILING, false) ) { context.startService(profilingServiceIntent); + //spice + context.startService(spiceProfilingServiceIntent); } else { context.stopService(profilingServiceIntent); + //spice + context.stopService(spiceProfilingServiceIntent); } }