diff options
author | Vivek Sekhar <vsekhar@codeaurora.org> | 2015-06-05 14:07:11 -0700 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-08-28 13:15:44 +0200 |
commit | d0f60407c935d5ab2aa3cb7ad67a4525aa84a0ed (patch) | |
tree | fdad6781104b79ef42d93f9dcd40a46c8ec0694f /src/com/android/browser/Tab.java | |
parent | 1c13cab53dbf8c4bebf1bc59e8ecb919b5f5c253 (diff) | |
download | android_packages_apps_Gello-d0f60407c935d5ab2aa3cb7ad67a4525aa84a0ed.tar.gz android_packages_apps_Gello-d0f60407c935d5ab2aa3cb7ad67a4525aa84a0ed.tar.bz2 android_packages_apps_Gello-d0f60407c935d5ab2aa3cb7ad67a4525aa84a0ed.zip |
Fix issue where bitmaps of tab are purged incorrectly
The tab index used in the key generation and deletion was based on index
of the tab in the tab manager. When a tab was closed the indices in the
tab manager is recalculated which inturn caused deletion of incorrect
bitmaps for the tab. Changed the code to use the id generated
by the tab to be used in the key generation to make it consistent.
Change-Id: I268ea2c8324f1832b0dea6d6aa63d14eca268e13
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r-- | src/com/android/browser/Tab.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index ccaa522a..4ca8937e 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -275,13 +275,12 @@ class Tab implements PictureListener { } public int getCaptureIndex(int navIndex) { - int tabPosition = mWebViewController.getTabControl().getCurrentPosition(); int orientation = mWebViewController.getActivity(). getResources().getConfiguration().orientation; int orientationBit = (orientation == Configuration.ORIENTATION_LANDSCAPE) ? 0 : 1; - int index = orientationBit << 31 | ((tabPosition & 0x7f) << 24) | (navIndex & 0xffffff); + int index = orientationBit << 31 | (((int)mId & 0x7f) << 24) | (navIndex & 0xffffff); return index; } |