Added an else block to prevent a null pointer in
RingerProcessingService.onStartCommand() closes #145
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.TwentyCodes.android.LocationRinger"
|
package="com.TwentyCodes.android.LocationRinger"
|
||||||
android:installLocation="internalOnly"
|
android:installLocation="internalOnly"
|
||||||
android:versionCode="152"
|
android:versionCode="154"
|
||||||
android:versionName="d36c436" >
|
android:versionName="7d75bb1" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="7"/>
|
<uses-sdk android:minSdkVersion="7"/>
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public class RingerProcessingService extends Service {
|
|||||||
|
|
||||||
if(intent == null)
|
if(intent == null)
|
||||||
stopSelf(startId);
|
stopSelf(startId);
|
||||||
|
else {
|
||||||
if (intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED) != null) {
|
if (intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED) != null) {
|
||||||
mLocation = intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED);
|
mLocation = intent.getParcelableExtra(LocationLibraryConstants.INTENT_EXTRA_LOCATION_CHANGED);
|
||||||
processRingers();
|
processRingers();
|
||||||
@@ -241,6 +241,7 @@ public class RingerProcessingService extends Service {
|
|||||||
Log.d(TAG, "Location was null");
|
Log.d(TAG, "Location was null");
|
||||||
stopSelf(startId);
|
stopSelf(startId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.onStartCommand(intent, flags, startId);
|
return super.onStartCommand(intent, flags, startId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user