"Fix" for ticket #2404

This commit is contained in:
meeh
2019-01-24 18:33:26 +00:00
parent 5d3aa1f625
commit 2d1664574d

View File

@ -5,6 +5,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import net.i2p.android.router.util.Util;
import net.i2p.android.router.I2PConstants;
import net.i2p.android.router.service.RouterService;
@ -19,7 +20,12 @@ public class OnBootReceiver extends BroadcastReceiver implements I2PConstants {
if (startOnBoot) {
Intent routerService = new Intent(context, RouterService.class);
context.startService(routerService);
// Ticket #2404
try {
context.startService(routerService);
} catch (IllegalStateException ex) {
Util.e("Error: ", ex);
}
}
}
}