Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java

Issue 2327833002: Address HandlerLeak lint warnings. (Closed)
Patch Set: tedchoc's comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698