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:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user