Skip to content

Commit

Permalink
Fix Memory leaks on Browser application
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Sebastien MICHEL authored and mikeNG committed May 12, 2014
1 parent cdf2e16 commit 03b1039
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/com/android/browser/NavScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ private void onCloseTab(Tab tab) {
} else {
mUiController.closeTab(tab);
}
mTabViews.remove(tab);
}
}

Expand Down Expand Up @@ -281,6 +282,7 @@ public View getView(final int position, View convertView, ViewGroup parent) {
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);
Expand Down

0 comments on commit 03b1039

Please sign in to comment.