From 75d4241f08b1354302119bc8e6a8a54b4621d977 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Wed, 29 Nov 2017 17:32:11 -0800 Subject: [PATCH] Closes #1842: Whitelist AS profiler files. Given the conditions under which I've noticed these files are added, it's only likely to occur in local builds. However, if we wanted to be extra safe that these files aren't kept on disk in release builds, we could explicitly delete them but then we'd presumably have to add a branch to allow developer builds to use these files without problems. For simplicity, I've opted for the whitelist. --- .../mozilla/focus/activity/WebViewDataTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/WebViewDataTest.java b/app/src/androidTest/java/org/mozilla/focus/activity/WebViewDataTest.java index 5558d84314e..80805375079 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/WebViewDataTest.java +++ b/app/src/androidTest/java/org/mozilla/focus/activity/WebViewDataTest.java @@ -54,7 +54,19 @@ public class WebViewDataTest { "app_dxmaker_cache", "telemetry", "databases", - "app_webview" + "app_webview", + + // Android Studio will inject these files if you: + // - Build with Android Studio 3.0+ + // - Have opened the "Android Profiler" tab at least once since the AS process started + // - Run on an API 26+ device (or maybe when explicitly enabling advanced debugging on older devices) + // + // This should only affect local builds and we don't want to risk breaking the profiler so + // we whitelist them. Additional details around when these files are added can be found in: + // https://github.com/mozilla-mobile/focus-android/issues/1842#issuecomment-348038392 + "libperfa_x86.so", + "perfa.jar", + "perfd" ); // We expect those folders to exist but they should be empty.