Skip to content

Commit

Permalink
Fix issue with webview not ready
Browse files Browse the repository at this point in the history
Some times, webview can return 0 for getWidth().  Guard against this
when taking a webview snapshot.

Change-Id: Id4d40aa90afcb86860237eac084c082b2bc012aa
  • Loading branch information
Sudheer Koganti committed Nov 24, 2015
1 parent f23cdc1 commit d911e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/android/browser/PhoneUi.java
Expand Up @@ -291,7 +291,7 @@ private void thumbnailUpdated(Tab t) {

Bitmap sbm;
WebView webView = getWebView();
if (webView != null) {
if (webView != null && webView.getWidth() != 0) {
int view_width = webView.getWidth();
int capture_width = mActivity.getResources().getDimensionPixelSize(
R.dimen.tab_thumbnail_width);
Expand Down

0 comments on commit d911e1e

Please sign in to comment.