I2P Android now using Enum for State
This commit is contained in:
@@ -148,7 +148,7 @@ public class BoteService extends Service implements NetworkStatusListener, NewEm
|
|||||||
mStateService = IRouterState.Stub.asInterface(service);
|
mStateService = IRouterState.Stub.asInterface(service);
|
||||||
try {
|
try {
|
||||||
mStateService.registerCallback(mStatusListener);
|
mStateService.registerCallback(mStatusListener);
|
||||||
final int state = mStateService.getState();
|
final State state = mStateService.getState();
|
||||||
if (state == State.ACTIVE)
|
if (state == State.ACTIVE)
|
||||||
I2PBote.getInstance().connectNow();
|
I2PBote.getInstance().connectNow();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
@@ -166,7 +166,7 @@ public class BoteService extends Service implements NetworkStatusListener, NewEm
|
|||||||
|
|
||||||
private final IRouterStateCallback.Stub mStatusListener =
|
private final IRouterStateCallback.Stub mStatusListener =
|
||||||
new IRouterStateCallback.Stub() {
|
new IRouterStateCallback.Stub() {
|
||||||
public void stateChanged(int newState) throws RemoteException {
|
public void stateChanged(State newState) throws RemoteException {
|
||||||
if (newState == State.STOPPING ||
|
if (newState == State.STOPPING ||
|
||||||
newState == State.MANUAL_STOPPING ||
|
newState == State.MANUAL_STOPPING ||
|
||||||
newState == State.MANUAL_QUITTING ||
|
newState == State.MANUAL_QUITTING ||
|
||||||
|
|||||||
Reference in New Issue
Block a user