I2P Android now using Enum for State

This commit is contained in:
str4d
2014-07-17 01:03:07 +00:00
parent 36ea804008
commit 21d71e09e3

View File

@@ -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 ||