diff options
| author | Grace Kloba <klobag@google.com> | 2010-04-22 08:20:23 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-22 08:20:23 -0700 |
| commit | 2fba6d1c1b445b2d26ccd32eb4084e759f513c5d (patch) | |
| tree | c609bc06cbc1486214b784206eec74086fb29bbe | |
| parent | 36fa47139d4621dc4bf8d89caa8650495d901b00 (diff) | |
| parent | 8aedd10aca67ce988888e99ecc3fcbe81344ea4d (diff) | |
| download | frameworks_base-2fba6d1c1b445b2d26ccd32eb4084e759f513c5d.zip frameworks_base-2fba6d1c1b445b2d26ccd32eb4084e759f513c5d.tar.gz frameworks_base-2fba6d1c1b445b2d26ccd32eb4084e759f513c5d.tar.bz2 | |
Merge "Post a message to set SurfaceView to be visible when we switch to use the layout size. Otherwise it will first use the old dimension which can exceed the limit, which in turn causes the Browser to crash." into froyo
| -rw-r--r-- | core/java/android/webkit/ViewManager.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/webkit/ViewManager.java b/core/java/android/webkit/ViewManager.java index ece33ab..153c1c2 100644 --- a/core/java/android/webkit/ViewManager.java +++ b/core/java/android/webkit/ViewManager.java @@ -205,7 +205,14 @@ class ViewManager { if (sView.getVisibility() == View.VISIBLE) { sView.setVisibility(View.INVISIBLE); sView.getHolder().setSizeFromLayout(); - sView.setVisibility(View.VISIBLE); + // setLayoutParams() only requests the layout. If we set it + // to VISIBLE now, it will use the old dimension to set the + // size. Post a message to ensure that it shows the new size. + mWebView.mPrivateHandler.post(new Runnable() { + public void run() { + sView.setVisibility(View.VISIBLE); + } + }); } else { sView.getHolder().setSizeFromLayout(); } |
