Added a null check for the RingerProcessingService starting intent
closes #134
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="137"
|
android:versionCode="143"
|
||||||
android:versionName="fc8952e" >
|
android:versionName="5ad5cb4" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="7"/>
|
<uses-sdk android:minSdkVersion="7"/>
|
||||||
|
|
||||||
|
|||||||
@@ -230,11 +230,17 @@ public class RingerProcessingService extends Service {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(intent == null)
|
||||||
|
stopSelf(startId);
|
||||||
|
|
||||||
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();
|
||||||
} else if (Debug.DEBUG)
|
} else {
|
||||||
|
if (Debug.DEBUG)
|
||||||
Log.d(TAG, "Location was null");
|
Log.d(TAG, "Location was null");
|
||||||
|
stopSelf(startId);
|
||||||
|
}
|
||||||
return super.onStartCommand(intent, flags, startId);
|
return super.onStartCommand(intent, flags, startId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user