diff options
author | Vivek Sekhar <vsekhar@codeaurora.org> | 2016-01-04 17:13:35 -0800 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2016-01-11 22:03:26 +0100 |
commit | 4ab271d9c27070ac1972fef858dc8f0af06b3e0c (patch) | |
tree | 5b194f69baf684ab70e349f7fdcd01b781e83694 /src/com/android | |
parent | 6213e2e94b1f0ea924dfe52ee5192c1e612e33c9 (diff) | |
download | android_packages_apps_Gello-4ab271d9c27070ac1972fef858dc8f0af06b3e0c.tar.gz android_packages_apps_Gello-4ab271d9c27070ac1972fef858dc8f0af06b3e0c.tar.bz2 android_packages_apps_Gello-4ab271d9c27070ac1972fef858dc8f0af06b3e0c.zip |
Fix tab snapshot to consider orientation
Capture of tab snapshot was not accounting for orientation change for scale calculation.
This caused a white bar to be seen for missing region in landscape mode.
CR-Fixed: SWE-6350
Change-Id: I00cdf055bf2477c294bcf871c98cc40eda8ad2c9
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/Tab.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 2ddd2d1c..80ef16d9 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -1975,8 +1975,11 @@ class Tab implements PictureListener { thumbnailUpdated(); return; } - - mMainView.getContentBitmapAsync((float) mCaptureWidth / mMainView.getWidth(), new Rect(), + int orientation = mWebViewController.getActivity(). + getResources().getConfiguration().orientation; + int width = (orientation == Configuration.ORIENTATION_PORTRAIT) ? mMainView.getWidth() : + mMainView.getHeight(); + mMainView.getContentBitmapAsync((float) mCaptureWidth / width, new Rect(), new ValueCallback<Bitmap>() { @Override public void onReceiveValue(Bitmap bitmap) { |