Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changed to only reuse thread if delay == 0
  • Loading branch information
rockytriton committed Jun 17, 2013
commit f48bdd955d4690f7602051d96722fc2382fe297f
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public void process(Element element, JCodeModel codeModel, EBeanHolder holder) t
holder.handler = holder.generatedClass.field(JMod.PRIVATE, handlerClass, "handler_", JExpr._new(handlerClass));
}

if (propagation == Propagation.REUSE) {
// Put in the check for the UI thread.
addUIThreadCheck(delegatingMethod, codeModel, holder);
}

if (delay == 0) {
if (propagation == Propagation.REUSE) {
// Put in the check for the UI thread.
addUIThreadCheck(delegatingMethod, codeModel, holder);
}

delegatingMethod.body().invoke(holder.handler, "post").arg(_new(anonymousRunnableClass));
} else {
delegatingMethod.body().invoke(holder.handler, "postDelayed").arg(_new(anonymousRunnableClass)).arg(lit(delay));
Expand Down