Code example for Time

Methods: after, before, compare

0
			if (!remote) 
				return State.LOCAL_ONLY;
			//Log.e(TAG, "time uuid = "+uuid); 
			//Log.e(TAG, "time local  "+localTime.toMillis(false)); 
			//Log.e(TAG, "time remote "+remoteTime.toMillis(false)); 
			if (Time.compare(localTime, remoteTime) == 0)
				return State.IN_SYNC;
			if (lastSync == null)
				return State.CONFLICT;
			//Log.e(TAG, "time last   "+lastSync.toMillis(false)); 
			boolean localIsUnchanged  = (Time.compare(localTime,  lastSync) == 0);
			boolean remoteIsUnchanged = (Time.compare(remoteTime, lastSync) == 0);
			if (localTime.before(remoteTime) && localIsUnchanged)
				return State.REMOTE_IS_NEWER;
			if (localTime.after(remoteTime) && remoteIsUnchanged)
				return State.LOCAL_IS_NEWER;
			return State.CONFLICT;
		} 
		 
		protected Action computeDefaultAction() { 
			switch (getState()) {