Nix the use of enum which is freaking out Proguard/Retroweaver. We'll sort it

out later when we're not in the middle of an Ice release.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4208 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-06-21 19:43:50 +00:00
parent 2f3ecdf86d
commit 5ceed9c8b2
+11 -7
View File
@@ -118,8 +118,8 @@ public abstract class IdleTracker
_lastEvent = getTimeStamp(); _lastEvent = getTimeStamp();
// idle-in if appropriate // idle-in if appropriate
if (_state != State.ACTIVE) { if (_state != ACTIVE) {
_state = State.ACTIVE; _state = ACTIVE;
idledIn(); idledIn();
} }
} }
@@ -138,7 +138,7 @@ public abstract class IdleTracker
// check whether they've idled out // check whether they've idled out
if (now >= (_lastEvent + _toIdleTime)) { if (now >= (_lastEvent + _toIdleTime)) {
Log.info("User idle for " + (now-_lastEvent) + "ms."); Log.info("User idle for " + (now-_lastEvent) + "ms.");
_state = State.IDLE; _state = IDLE;
idledOut(); idledOut();
} }
break; break;
@@ -148,15 +148,15 @@ public abstract class IdleTracker
if (now >= (_lastEvent + _toIdleTime + _toAbandonTime)) { if (now >= (_lastEvent + _toIdleTime + _toAbandonTime)) {
Log.info("User idle for " + (now-_lastEvent) + "ms. " + Log.info("User idle for " + (now-_lastEvent) + "ms. " +
"Abandoning ship."); "Abandoning ship.");
_state = State.ABANDONED; _state = ABANDONED;
abandonedShip(); abandonedShip();
} }
break; break;
} }
} }
/** The user's current state. */ // /** The user's current state. */
protected static enum State { ACTIVE, IDLE, ABANDONED }; // protected static enum State { ACTIVE, IDLE, ABANDONED };
/** The duration after which we declare the user to be idle. */ /** The duration after which we declare the user to be idle. */
protected long _toIdleTime; protected long _toIdleTime;
@@ -169,5 +169,9 @@ public abstract class IdleTracker
protected long _lastEvent; protected long _lastEvent;
/** Whether the user is currently active, idle or abandoned. */ /** Whether the user is currently active, idle or abandoned. */
protected State _state = State.ACTIVE; protected int _state = ACTIVE;
protected static final int ACTIVE = 0;
protected static final int IDLE = 1;
protected static final int ABANDONED = 2;
} }