Closed wasky closed 1 year ago
@wasky I will review it later. Meanwhile, can you help with the documentation and change log that will happen because of this change? And also the arrow change?
I've labeled all the issues and PR with 3.0.0.
OK
@wasky, Sorry to refer to this request as I have a question... This 3.0.0 label for this edition will be the last revised for publication from the library, correct?
@lucianocheng Would you like to review this code since I don't have much context on a coroutine?
@burhanrashid52 unfortunately I don't think I can get to this anytime soon.
@wasky, Sorry to refer to this request as I have a question... This 3.0.0 label for this edition will be the last revised for publication from the library, correct?
Yes
This commit replaces deprecated AsyncTask for saving images with Kotlin coroutines. Coroutines is Google's recommended solution for asynchronous programming on Android.
The commit also fixes a crash caused by View.draw() being called from worker thread when saving image (issue #374). As documentation says (https://developer.android.com/topic/performance/threads#references):
By design, Android View objects are not thread-safe. An app is expected to create, use, and destroy UI objects, all on the main thread. If you try to modify or even reference a UI object in a thread other than the main thread, the result can be exceptions, silent failures, crashes, and other undefined misbehavior.