Reduce parceled data size between system & sysui
- SystemUI no longer uses the detailed task info since we exclusively call
startActivityFromRecents() instead of starting the activity ourselves.
In addition, all other uses of Task.fillTaskInfo() are currently to
notify SysUI of task changes (either from the task change notifier or
task org), and these task infos don't need the full intent extras or
clip data either. So we can just push up the code to clear the extras
into Task.fillTaskInfo() and only partially clone the intent.
Bug: 150242007
Test: atest RecentTasksTest
Test: atest RunningTasksTest
Test: atest TaskOrganizerTests
Change-Id: Idd3d197c7b63d00ae213571a69279dee98256ba0
diff --git a/services/core/java/com/android/server/wm/TaskOrganizerController.java b/services/core/java/com/android/server/wm/TaskOrganizerController.java
index 0f1e623..8f5d048 100644
--- a/services/core/java/com/android/server/wm/TaskOrganizerController.java
+++ b/services/core/java/com/android/server/wm/TaskOrganizerController.java
@@ -253,8 +253,7 @@
final int nextId = display.getNextStackId();
TaskTile tile = new TaskTile(mService, nextId, windowingMode);
display.addTile(tile);
- RunningTaskInfo out = new RunningTaskInfo();
- tile.fillTaskInfo(out);
+ RunningTaskInfo out = tile.getTaskInfo();
mLastSentTaskInfos.put(tile, out);
return out;
}
@@ -412,9 +411,7 @@
&& !ArrayUtils.contains(activityTypes, as.getActivityType())) {
continue;
}
- final RunningTaskInfo info = new RunningTaskInfo();
- as.fillTaskInfo(info);
- out.add(info);
+ out.add(as.getTaskInfo());
}
}
return out;
@@ -447,9 +444,7 @@
&& !ArrayUtils.contains(activityTypes, task.getActivityType())) {
continue;
}
- final RunningTaskInfo info = new RunningTaskInfo();
- task.fillTaskInfo(info);
- out.add(info);
+ out.add(task.getTaskInfo());
}
return out;
}