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 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); }