mirror of https://github.com/tasks/tasks
Merge branch 'master' into dev
commit
b8623d2500
@ -0,0 +1,22 @@
|
||||
package com.todoroo.astrid.utility;
|
||||
|
||||
public class Flags {
|
||||
|
||||
private static int state = 0;
|
||||
|
||||
/**
|
||||
* Whether to refresh the task list
|
||||
*/
|
||||
public static final int REFRESH = 1;
|
||||
|
||||
public static boolean checkAndClear(int flag) {
|
||||
boolean set = (state & flag) > 0;
|
||||
state &= ~flag;
|
||||
return set;
|
||||
}
|
||||
|
||||
public static void set(int flag) {
|
||||
state |= flag;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue