Added an else block to prevent a null pointer in

RingerProcessingService.onStartCommand()

closes #145
This commit is contained in:
2012-08-20 11:22:24 -04:00
parent 7d75bb162d
commit ec9f0d18dc
2 changed files with 11 additions and 10 deletions

View File

@@ -232,14 +232,15 @@ public class RingerProcessingService extends Service {
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");
stopSelf(startId);
else {
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");
stopSelf(startId);
}
}
return super.onStartCommand(intent, flags, startId);
}