Skip to content

Commit f9056d6

Browse files
committed
Fix log not done inside runnable for @background and @UIThread
1 parent 575b20e commit f9056d6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/handler/AnnotationHandlers.java‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ public AnnotationHandlers(ProcessingEnvironment processingEnvironment) {
110110
add(new ServiceActionHandler(processingEnvironment));
111111
add(new SubscribeHandler(processingEnvironment));
112112
add(new ProduceHandler(processingEnvironment));
113-
add(new UiThreadHandler(processingEnvironment));
114-
add(new BackgroundHandler(processingEnvironment));
115113
add(new InstanceStateHandler(processingEnvironment));
116114
add(new HttpsClientHandler(processingEnvironment));
117115
add(new OnActivityResultHandler(processingEnvironment));
@@ -122,9 +120,12 @@ public AnnotationHandlers(ProcessingEnvironment processingEnvironment) {
122120
add(new AfterInjectHandler(processingEnvironment));
123121
add(new AfterViewsHandler(processingEnvironment));
124122

125-
if (traceActivated(processingEnvironment)) {
126-
add(new TraceHandler(processingEnvironment));
127-
}
123+
if (traceActivated(processingEnvironment)) {
124+
add(new TraceHandler(processingEnvironment));
125+
}
126+
/* UIThreadHandler and BackgroundHandler must be after TraceHandler */
127+
add(new UiThreadHandler(processingEnvironment));
128+
add(new BackgroundHandler(processingEnvironment));
128129
}
129130

130131
private void add(AnnotationHandler<? extends GeneratedClassHolder> annotationHandler) {

0 commit comments

Comments
 (0)