You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ee604ee
Browse filesBrowse the repository at this point in the historyBrowse files
Drozdov Artyom
committed
add: thread control by @SupposeBackground and @SupposeUiThread annotations
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/BackgroundExecutor.java
+89-1Lines changed: 89 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
packageorg.androidannotations.api;
17
17
18
18
importjava.util.ArrayList;
19
+
importjava.util.Arrays;
19
20
importjava.util.List;
20
21
importjava.util.concurrent.Executor;
21
22
importjava.util.concurrent.ExecutorService;
@@ -25,6 +26,7 @@
25
26
importjava.util.concurrent.TimeUnit;
26
27
importjava.util.concurrent.atomic.AtomicBoolean;
27
28
29
+
importandroid.os.Looper;
28
30
importandroid.util.Log;
29
31
30
32
publicclassBackgroundExecutor {
@@ -33,8 +35,32 @@ public class BackgroundExecutor {
thrownewIllegalStateException("Method invocation is expected from a background thread, but it was called from the UI thread");
48
+
}
49
+
thrownewIllegalStateException("Method invocation is expected from one of serials " + Arrays.toString(expectedSerials) + ", but it was called from the UI thread");
thrownewIllegalStateException("Method invocation is expected from one of serials " + Arrays.toString(expectedSerials) + ", but it was called from " + currentSerial + " serial");
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/handler/AnnotationHandlers.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -126,8 +126,11 @@ public AnnotationHandlers(ProcessingEnvironment processingEnvironment) {
126
126
add(newTraceHandler(processingEnvironment));
127
127
}
128
128
/* UIThreadHandler and BackgroundHandler must be after TraceHandler */
0 commit comments