From 6d2b1bfe385734372a2728daadfee1c2b16e1251 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Mon, 11 May 2020 10:26:01 -0700 Subject: [PATCH] fix app binder tracing on userdebug builds All apps are profileable on debuggable builds, so enable binder tracing during app startup on debuggable builds if binder tracing has already been enabled. Test: binder tracing shows up for new apps on userdebug Bug: 156259316 Change-Id: I8cc6c2f711943c21b54f346a23ba7089dc9c9180 --- core/java/android/app/ActivityThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index e97ebd7eee06c..b45705924910c 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -6420,7 +6420,7 @@ public final class ActivityThread extends ClientTransactionHandler { // Allow binder tracing, and application-generated systrace messages if we're profileable. boolean isAppProfileable = data.appInfo.isProfileableByShell(); Trace.setAppTracingAllowed(isAppProfileable); - if (isAppProfileable && data.enableBinderTracking) { + if ((isAppProfileable || Build.IS_DEBUGGABLE) && data.enableBinderTracking) { Binder.enableTracing(); }