Skip to content

Commit e901cda

Browse files
committed
Use long for delay everywhere related to @background
1 parent 192c316 commit e901cda

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/annotations/Background.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
*
192192
* @return the delay of the execution
193193
*/
194-
int delay() default 0;
194+
long delay() default 0;
195195

196196
/**
197197
* Serial execution group.

‎AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/api/BackgroundExecutor.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static synchronized void execute(Task task) {
158158
* {@link #setExecutor(Executor)} has been called with such an
159159
* executor)
160160
*/
161-
public static void execute(final Runnable runnable, String id, int delay, String serial) {
161+
public static void execute(final Runnable runnable, String id, long delay, String serial) {
162162
execute(new Task(id, delay, serial) {
163163
@Override
164164
public void execute() {
@@ -180,7 +180,7 @@ public void execute() {
180180
* {@link #setExecutor(Executor)} has been called with such an
181181
* executor)
182182
*/
183-
public static void execute(Runnable runnable, int delay) {
183+
public static void execute(Runnable runnable, long delay) {
184184
directExecute(runnable, delay);
185185
}
186186

@@ -198,7 +198,7 @@ public static void execute(Runnable runnable) {
198198
* Execute a task after all tasks added with the same non-null
199199
* <code>serial</code> (if any) have completed execution.
200200
*
201-
* Equivalent to {@link #execute(Runnable, String, int, String)
201+
* Equivalent to {@link #execute(Runnable, String, long, String)
202202
* execute(runnable, id, 0, serial)}.
203203
*
204204
* @param runnable
@@ -380,7 +380,7 @@ public static abstract class Task implements Runnable {
380380
*/
381381
private AtomicBoolean managed = new AtomicBoolean();
382382

383-
public Task(String id, int delay, String serial) {
383+
public Task(String id, long delay, String serial) {
384384
if (!"".equals(id)) {
385385
this.id = id;
386386
}

‎AndroidAnnotations/androidannotations-core/androidannotations/src/main/java/org/androidannotations/internal/core/handler/BackgroundHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void process(Element element, EComponentHolder holder) throws Exception {
7070

7171
Background annotation = element.getAnnotation(Background.class);
7272
String id = annotation.id();
73-
int delay = annotation.delay();
73+
long delay = annotation.delay();
7474
String serial = annotation.serial();
7575

7676
AbstractJClass backgroundExecutorClass = getJClass(BackgroundExecutor.class);

0 commit comments

Comments
 (0)