7e24c6c6f9
Part 1: MessageView - It's an attempt to get rid of Handlers from Activities, and reduce the amount of code that runs run a BG thread in them. - Introduced ResultUiThreadWrapper, which wraps another Controller.Result and make callbacks get called on the UI thread. - It'll make the logic in ControllerResults cleaner and more straightforward. - ResultUiThreadWrapper isn't too memory efficient because it allocates a Runnable even if the wrappee's target method is empty. However these callbacks don't get called often, and optimizing it would make code more complicated, so I don't think it's worth optimizing. - Now we can assume all the methods in activities except AsyncTask.doInBackground runs on the UI thread, with some special exceptions like MediaScannerNotifier. In my previous abandoned change, I named methods that can run on BG threads '*OnUiThread', but now there's no need to do that. This also means we can minimize the use of synchronizations. Change-Id: Ia6d9d2a266ebf5a4b23d712e9eaea3272adbd2a6 |
||
---|---|---|
assets | ||
docs | ||
images | ||
res | ||
src | ||
tests | ||
.classpath | ||
.project | ||
Android.mk | ||
AndroidManifest.xml | ||
CleanSpec.mk | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
proguard.flags | ||
remove-exchange-support.sh |