make sure the Intent passed to Service.onStart() is not null, not sure why it would be, but saw such an exception on the market

This commit is contained in:
Thialfihar 2010-06-04 21:52:20 +00:00
parent e334a36194
commit a571ce7c52

View File

@ -54,7 +54,9 @@ public class Service extends android.app.Service {
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
mPassPhraseCacheTtl = intent.getIntExtra(EXTRA_TTL, 15);
if (intent != null) {
mPassPhraseCacheTtl = intent.getIntExtra(EXTRA_TTL, 15);
}
if (mPassPhraseCacheTtl < 15) {
mPassPhraseCacheTtl = 15;
}