From 7a726f22c55a4e08a75ac4ff6e5bc50a1231ad9a Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Wed, 8 Aug 2012 09:46:31 -0400 Subject: [PATCH] Added a null check for the RingerProcessingService starting intent closes #134 --- LocationRinger/AndroidManifest.xml | 4 ++-- .../services/RingerProcessingService.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/LocationRinger/AndroidManifest.xml b/LocationRinger/AndroidManifest.xml index ced47e5..0feb9b2 100644 --- a/LocationRinger/AndroidManifest.xml +++ b/LocationRinger/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="143" + android:versionName="5ad5cb4" > diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java index d25f754..0a884c3 100644 --- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java +++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java @@ -230,11 +230,17 @@ public class RingerProcessingService extends Service { e.printStackTrace(); } + if(intent == null) + stopSelf(startId); + if (intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED) != null) { mLocation = intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED); processRingers(); - } else if (Debug.DEBUG) - Log.d(TAG, "Location was null"); + } else { + if (Debug.DEBUG) + Log.d(TAG, "Location was null"); + stopSelf(startId); + } return super.onStartCommand(intent, flags, startId); }