summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSudheer Koganti <skoganti@codeaurora.org>2015-11-24 09:24:23 -0800
committerjrizzoli <joey@cyanogenmoditalia.it>2015-11-27 16:34:41 +0100
commit725fcf8f9b5a70463dbd0228358675cb6da25e28 (patch)
tree944fbb386c75fd665f7697336447a26aef9ec2b3 /src
parentc7b08f03e4e4dfa4001e29f875d0c26e88f40ddd (diff)
downloadandroid_packages_apps_Gello-725fcf8f9b5a70463dbd0228358675cb6da25e28.tar.gz
android_packages_apps_Gello-725fcf8f9b5a70463dbd0228358675cb6da25e28.tar.bz2
android_packages_apps_Gello-725fcf8f9b5a70463dbd0228358675cb6da25e28.zip
Fix issue with webview not ready
Some times, webview can return 0 for getWidth(). Guard against this when taking a webview snapshot. Change-Id: Id4d40aa90afcb86860237eac084c082b2bc012aa
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/PhoneUi.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index e629952b..da5b01c9 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -288,7 +288,7 @@ public class PhoneUi extends BaseUi {
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);