summaryrefslogtreecommitdiff
path: root/quickstep
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2022-02-25 06:41:45 +0000
committerWinson Chung <winsonc@google.com>2022-02-25 06:41:45 +0000
commite479619836b1abf874ab25bdfb2402bf84ed0f56 (patch)
treecdef29ac75e7845ab03a0b8950d74888f5ff20cc /quickstep
parent2a431f4a7982c460933a22f654f1a769e9ede549 (diff)
downloadLauncher3-e479619836b1abf874ab25bdfb2402bf84ed0f56.tar.gz
Just return an empty list if the system returns null
Bug: 206648922 Test: Presubmit (unable to reproduce this) Change-Id: I04a4759a1c237513ab314ece4acd542e1407edb1
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/SystemUiProxy.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index d28796c89e..8b00f45426 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -816,8 +816,12 @@ public class SystemUiProxy implements ISystemUiProxy,
public ArrayList<GroupedRecentTaskInfo> getRecentTasks(int numTasks, int userId) {
if (mRecentTasks != null) {
try {
- return new ArrayList<>(Arrays.asList(mRecentTasks.getRecentTasks(numTasks,
- RECENT_IGNORE_UNAVAILABLE, userId)));
+ final GroupedRecentTaskInfo[] rawTasks = mRecentTasks.getRecentTasks(numTasks,
+ RECENT_IGNORE_UNAVAILABLE, userId);
+ if (rawTasks == null) {
+ return new ArrayList<>();
+ }
+ return new ArrayList<>(Arrays.asList(rawTasks));
} catch (RemoteException e) {
Log.w(TAG, "Failed call getRecentTasks", e);
}