Added an else block to prevent a null pointer in
RingerProcessingService.onStartCommand() closes #145
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user