`}
redef class App
- redef fun run_on_ui_thread(task) do app.native_activity.run_on_ui_thread task
+ redef fun run_on_ui_thread(task)
+ do
+ if app.activities.not_empty then
+ app.native_activity.run_on_ui_thread task
+ else
+ # There is no UI, it must be a service, run on the caller thread
+ task.main
+ end
+ end
end
redef class Text
}
`}
end
+
+# Force linearization of print
+#
+# TODO prioritize `android::log`
+redef fun print(object) do super