Merge "Only update the task description when the task/description changes"

This commit is contained in:
TreeHugger Robot 2017-11-27 19:31:44 +00:00 committed by Android (Google) Code Review
commit 03adf737a9
2 changed files with 3 additions and 3 deletions

View File

@ -1426,9 +1426,6 @@ class RecentTasks {
* Creates a new RecentTaskInfo from a TaskRecord. * Creates a new RecentTaskInfo from a TaskRecord.
*/ */
ActivityManager.RecentTaskInfo createRecentTaskInfo(TaskRecord tr) { ActivityManager.RecentTaskInfo createRecentTaskInfo(TaskRecord tr) {
// Update the task description to reflect any changes in the task stack
tr.updateTaskDescription();
// Compose the recent task info // Compose the recent task info
ActivityManager.RecentTaskInfo rti = new ActivityManager.RecentTaskInfo(); ActivityManager.RecentTaskInfo rti = new ActivityManager.RecentTaskInfo();
rti.id = tr.getTopActivity() == null ? INVALID_TASK_ID : tr.taskId; rti.id = tr.getTopActivity() == null ? INVALID_TASK_ID : tr.taskId;

View File

@ -1626,6 +1626,9 @@ class TaskRecord extends ConfigurationContainer implements TaskWindowContainerLi
final int effectiveRootIndex = findEffectiveRootIndex(); final int effectiveRootIndex = findEffectiveRootIndex();
final ActivityRecord r = mActivities.get(effectiveRootIndex); final ActivityRecord r = mActivities.get(effectiveRootIndex);
setIntent(r); setIntent(r);
// Update the task description when the activities change
updateTaskDescription();
} }
void saveToXml(XmlSerializer out) throws IOException, XmlPullParserException { void saveToXml(XmlSerializer out) throws IOException, XmlPullParserException {