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

Unified Diff: sky/shell/android/org/domokit/sky/shell/TracingController.java

Issue 1150263003: Stop leaking the TracingController's BroadcastReciever (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add missing call to super.onStop() Created 5 years, 6 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
« no previous file with comments | « sky/shell/android/org/domokit/sky/shell/SkyActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/android/org/domokit/sky/shell/TracingController.java
diff --git a/sky/shell/android/org/domokit/sky/shell/TracingController.java b/sky/shell/android/org/domokit/sky/shell/TracingController.java
index 716e0c007d833cdd46b65c79537436af446a9d53..b373747f6dc9fa03aab5833941a640c3000009c8 100644
--- a/sky/shell/android/org/domokit/sky/shell/TracingController.java
+++ b/sky/shell/android/org/domokit/sky/shell/TracingController.java
@@ -8,17 +8,16 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.os.Environment;
import android.util.Log;
+import org.chromium.base.JNINamespace;
+
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
-import org.chromium.base.JNINamespace;
-
/**
* A controller for the tracing system.
*/
@@ -40,6 +39,10 @@ class TracingController {
mContext.registerReceiver(mBroadcastReceiver, mIntentFilter);
}
+ public void stop() {
+ mContext.unregisterReceiver(mBroadcastReceiver);
+ }
+
private String generateTracingFilePath() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HHmmss", Locale.US);
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
« no previous file with comments | « sky/shell/android/org/domokit/sky/shell/SkyActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698