From 381fd5c910c94033afd3dd5db867f52926600a12 Mon Sep 17 00:00:00 2001 From: Mark Gillespie Date: Fri, 27 Jan 2017 18:21:34 +0000 Subject: [PATCH] Move the powermanager before the intent. Removed wrapper properties from source control. This is dynamically generated. --- gradle/wrapper/gradle-wrapper.properties | 6 ------ .../re/jcg/playmusicexporter/services/ExportAllService.java | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 gradle/wrapper/gradle-wrapper.properties diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index a5b1a18..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sun Jan 22 21:19:51 CET 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/playmusicexporter/src/main/java/re/jcg/playmusicexporter/services/ExportAllService.java b/playmusicexporter/src/main/java/re/jcg/playmusicexporter/services/ExportAllService.java index 94ad632..5175ecb 100644 --- a/playmusicexporter/src/main/java/re/jcg/playmusicexporter/services/ExportAllService.java +++ b/playmusicexporter/src/main/java/re/jcg/playmusicexporter/services/ExportAllService.java @@ -28,11 +28,11 @@ public class ExportAllService extends IntentService { private static PowerManager m_powerManager; public static void startExport(Context pContext) { + m_powerManager = (PowerManager) pContext.getSystemService(POWER_SERVICE); Intent lIntent = new Intent(pContext, ExportAllService.class); lIntent.setAction(ACTION_EXPORT); pContext.startService(lIntent); Log.i(TAG, "Intent sent!"); - m_powerManager = (PowerManager) pContext.getSystemService(POWER_SERVICE); } public ExportAllService()