summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien MICHEL <sebastien.michel@intel.com>2012-09-07 18:22:08 +0200
committerbxu10x <binx.xu@intel.com>2014-05-04 10:26:10 +0000
commit4e019c3e1e437448e92e5b58fb05f5a55450007e (patch)
tree10189c3668d5e9c171474da9c67417fbe87339b0 /src
parentf4abb38e9ba7daeefedb24431dc71d9554164177 (diff)
downloadBrowser-4e019c3e1e437448e92e5b58fb05f5a55450007e.tar.gz
Fix Memory leaks on Browser application
Working on Issue 31125 (http://code.google.com/p/android/issues /detail?id=31125): * Enhance mTabViews management on NavScreen class (add remove() function when necessary). Change-Id: I89662880107ae88ead40d5246286d4ab65ed9e75 Signed-off-by: Sebastien MICHEL <sebastien.michel@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/NavScreen.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index fda8bcb1..4e819158 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -162,6 +162,7 @@ public class NavScreen extends RelativeLayout
} else {
mUiController.closeTab(tab);
}
+ mTabViews.remove(tab);
}
}
@@ -239,6 +240,7 @@ public class NavScreen extends RelativeLayout
public void onClick(View v) {
if (tabview.isClose(v)) {
mScroller.animateOut(tabview);
+ mTabViews.remove(tab);
} else if (tabview.isTitle(v)) {
switchToTab(tab);
mUi.getTitleBar().setSkipTitleBarAnimations(true);