Use PersistedTaskSnapshotData to calculate TaskView size
- Disabled variable width for running task, as PersistedTaskSnapshotData is not always up to date for current task after rotating the device Bug: 174464656 Test: Test tablet overview with different comination of portrait/landscape wide/narrow thumbnails in portrait/landscape Change-Id: Ifa01e72020ccaf422e3975b092462de85fa19efd
This commit is contained in:
1 parent
8dd4ddc7ae
commit
3a06568d8b
4 files changed
+18
-39
No files matched your search
@@ -191,6 +191,7 @@ public class RecentTasksList extends TaskStackChangeListener {
|
||||
} else {
|
||||
task = new Task(taskKey);
|
||||
}
|
||||
task.setLastSnapshotData(rawTask);
|
||||
allTasks.add(task);
|
||||
}
|
||||
|
||||
@@ -200,9 +201,7 @@ public class RecentTasksList extends TaskStackChangeListener {
|
||||
private ArrayList<Task> copyOf(ArrayList<Task> tasks) {
|
||||
ArrayList<Task> newTasks = new ArrayList<>();
|
||||
for (int i = 0; i < tasks.size(); i++) {
|
||||
Task t = tasks.get(i);
|
||||
newTasks.add(new Task(t.key, t.colorPrimary, t.colorBackground, t.isDockable,
|
||||
t.isLocked, t.taskDescription, t.topActivity));
|
||||
newTasks.add(new Task(tasks.get(i)));
|
||||
}
|
||||
return newTasks;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user