Fix issue with Shell listeners being unbound if SysUI is restarted
- If SysUI is restarted (ie. during dev or a crash), the components
registering the shell listeners may not be aware of this, and
listener callbacks will not be re-registered. Currently all the
listeners are managed correctly (bound & later unbound) so we can
just keep the active listener references to re-register if this
happens.
Bug: 207142749
Test: Kill SysUI, start some apps and ensure Launcher still shows them
in recents
Change-Id: Iba3b11ee972caf8f0b482942d38c3a7359211180
This commit is contained in:
1 parent
0b7ed895e7
commit
34e384d2e1
4 files changed
+59
-41
No files matched your search
@@ -36,6 +36,7 @@ import com.android.wm.shell.recents.IRecentTasksListener;
|
||||
import com.android.wm.shell.util.GroupedRecentTaskInfo;
|
||||
import com.android.wm.shell.util.StagedSplitBounds;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Consumer;
|
||||
@@ -219,6 +220,26 @@ public class RecentTasksList {
|
||||
return newTasks;
|
||||
}
|
||||
|
||||
public void dump(String prefix, PrintWriter writer) {
|
||||
writer.println(prefix + "RecentTasksList:");
|
||||
writer.println(prefix + " mChangeId=" + mChangeId);
|
||||
writer.println(prefix + " mResultsUi=[id=" + mResultsUi.mRequestId + ", tasks=");
|
||||
for (GroupTask task : mResultsUi) {
|
||||
writer.println(prefix + " t1=" + task.task1.key.id
|
||||
+ " t2=" + (task.hasMultipleTasks() ? task.task2.key.id : "-1"));
|
||||
}
|
||||
writer.println(prefix + " ]");
|
||||
int currentUserId = Process.myUserHandle().getIdentifier();
|
||||
ArrayList<GroupedRecentTaskInfo> rawTasks =
|
||||
mSysUiProxy.getRecentTasks(Integer.MAX_VALUE, currentUserId);
|
||||
writer.println(prefix + " rawTasks=[");
|
||||
for (GroupedRecentTaskInfo task : rawTasks) {
|
||||
writer.println(prefix + " t1=" + task.mTaskInfo1.taskId
|
||||
+ " t2=" + (task.mTaskInfo2 != null ? task.mTaskInfo2.taskId : "-1"));
|
||||
}
|
||||
writer.println(prefix + " ]");
|
||||
}
|
||||
|
||||
private static class TaskLoadResult extends ArrayList<GroupTask> {
|
||||
|
||||
final int mRequestId;
|
||||
|
||||
Reference in new issue
Block a user