Reset logging name of Task at the end of setIntent
In case ProtoLog is enabled that evaluates "this.toString"
too early, which caches the intermediate states in the string.
Bug: 328114157
Test: Start dream activity from Screen saver Settings.
"adb shell dumpsys activity activities" should show
the task with "type=dream".
Change-Id: I21f8cf0f3d6d43e762bb45d8c5d6374eaae58378
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 1353ff0..df2d80d 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -978,7 +978,6 @@
}
effectiveUid = info.applicationInfo.uid;
mIsEffectivelySystemApp = info.applicationInfo.isSystemApp();
- stringName = null;
if (info.targetActivity == null) {
if (_intent != null) {
@@ -1045,6 +1044,7 @@
updateTaskDescription();
}
mSupportsPictureInPicture = info.supportsPictureInPicture();
+ stringName = null;
// Re-adding the task to Recents once updated
if (inRecents) {