Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java |
index fcbe1c0562e5bca573a81a4f209d0d449eb721be..b478ebdb9fdc4b1854b02f545dcc8d70858f437b 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java |
@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.compositor.overlays.strip; |
import static org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.AnimatableAnimation.createAnimation; |
+import android.annotation.SuppressLint; |
import android.content.Context; |
import android.content.res.Resources; |
import android.os.Handler; |
@@ -217,6 +218,13 @@ public class StripLayoutHelper { |
} |
/** |
+ * Cleans up internal state. |
+ */ |
+ public void destroy() { |
+ mStripTabEventHandler.removeCallbacksAndMessages(null); |
+ } |
+ |
+ /** |
* Get a list of virtual views for accessibility. |
* |
* @param views A List to populate with virtual views. |
@@ -1506,6 +1514,7 @@ public class StripLayoutHelper { |
} |
} |
+ @SuppressLint("HandlerLeak") |
private class StripTabEventHandler extends Handler { |
@Override |
public void handleMessage(Message m) { |