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

Unified Diff: chrome/android/java/AndroidManifest.xml

Issue 1691993003: Hook up LeakCanary to ChromePublic.apk (behind a GN arg) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@leak-canary-2
Patch Set: manifest tweaks Created 4 years, 10 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/AndroidManifest.xml
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 914ef9ac4e4a6a168f70252cb5eae9b08d22ff46..8cdc2bf5c65f25e5e8497bd53a2c9f0ba77fd1f6 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -715,6 +715,39 @@ android:value="true" />
<meta-data android:name="org.chromium.components.service_tab_launcher.SERVICE_TAB_LAUNCHER"
android:value="org.chromium.chrome.browser.ChromeServiceTabLauncher" />
+ {% set enable_leakcanary = enable_leakcanary|default(0) %}
+ {% if enable_leakcanary == "true" %}
+ {# Entries for LeakCanary copied from (and then tweaked):
+ //third_party/leakcanary/src/leakcanary-android/src/main/AndroidManifest.xml #}
+ <service
+ android:name="com.squareup.leakcanary.internal.HeapAnalyzerService"
+ android:process=":leakcanary"
+ android:enabled="false" />
+ <activity
+ android:theme="@style/leak_canary_LeakCanary.Base"
+ android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"
+ android:process=":leakcanary2" {# Added to avoid StrictMode violations crashing the activity #}
+ android:label="@string/app_name" {# Changed from "string/leak_canary_display_activity_label" to help distinguaish when multiple apps include leakcanary. #}
+ android:icon="@drawable/leak_canary_icon"
+ android:taskAffinity=".com.squareup.leakcanary"> {# Added leading "." for multi-app case. #}
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <service
+ android:name="com.squareup.leakcanary.DisplayLeakService"
+ android:process=":leakcanary2" {# Added to minimize interaction with browser process. #}
+ android:enabled="false" />
+ <activity {# This is just a toast-like overlay, so leaving in browser process #}
+ android:theme="@style/leak_canary_Theme.Transparent"
+ android:name="com.squareup.leakcanary.internal.RequestStoragePermissionActivity"
+ android:taskAffinity="com.squareup.leakcanary"
+ android:enabled="false"
+ android:icon="@drawable/leak_canary_icon"
+ android:label="@string/leak_canary_storage_permission_activity_label" />
+ {% endif %}
+
{% block extra_application_definitions %}
<!-- Media route controllers to use for remote playback (cast).

Powered by Google App Engine
This is Rietveld 408576698