"Fix" for ticket #2404
This commit is contained in:
@ -5,6 +5,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import net.i2p.android.router.util.Util;
|
||||||
|
|
||||||
import net.i2p.android.router.I2PConstants;
|
import net.i2p.android.router.I2PConstants;
|
||||||
import net.i2p.android.router.service.RouterService;
|
import net.i2p.android.router.service.RouterService;
|
||||||
@ -19,7 +20,12 @@ public class OnBootReceiver extends BroadcastReceiver implements I2PConstants {
|
|||||||
|
|
||||||
if (startOnBoot) {
|
if (startOnBoot) {
|
||||||
Intent routerService = new Intent(context, RouterService.class);
|
Intent routerService = new Intent(context, RouterService.class);
|
||||||
|
// Ticket #2404
|
||||||
|
try {
|
||||||
context.startService(routerService);
|
context.startService(routerService);
|
||||||
|
} catch (IllegalStateException ex) {
|
||||||
|
Util.e("Error: ", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user