Added a null check for the RingerProcessingService starting intent

closes #134
This commit is contained in:
2012-08-08 09:46:31 -04:00
parent 5ad5cb4a00
commit 7a726f22c5
2 changed files with 10 additions and 4 deletions

View File

@@ -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);
}