Fall back to internal router if I2P Android is pre-0.9.13

This commit is contained in:
str4d
2014-06-04 21:20:33 +00:00
parent 846c082279
commit f0dfaecbe5

View File

@@ -255,7 +255,14 @@ public class EmailListActivity extends ActionBarActivity implements
Intent i2pIntent = new Intent(IRouterState.class.getName());
i2pIntent.setClassName("net.i2p.android.router",
"net.i2p.android.router.service.RouterService");
mTriedBindState = bindService(i2pIntent, mStateConnection, BIND_AUTO_CREATE);
try {
mTriedBindState = bindService(
i2pIntent, mStateConnection, BIND_AUTO_CREATE);
} catch (SecurityException e) {
// Old version of I2P Android (pre-0.9.13), cannot use
mStateService = null;
mTriedBindState = false;
}
}
}