Bug 709817 - Ensure PZC is always accessed on the UI thread. r=pcwalton

Ensure that all public functions in PZC are always called from
the UI thread, so that internal variables are not mutated on
different threads. I also made animatedZoomTo private so that
it can't be inadvertently called from a non-UI thread outside
the class.
This commit is contained in:
Kartikaya Gupta
2011-12-20 16:53:39 -05:00
parent 89435d8982
commit 23b9d8db14
2 changed files with 9 additions and 3 deletions

View File

@@ -281,8 +281,13 @@ public class LayerController {
/** Aborts any pan/zoom animation that is currently in progress. */
public void abortPanZoomAnimation() {
if (mPanZoomController != null)
mPanZoomController.abortAnimation();
if (mPanZoomController != null) {
mView.post(new Runnable() {
public void run() {
mPanZoomController.abortAnimation();
}
});
}
}
/**