Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f86fee6 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Just return an empty list if the system returns null am: e4796198

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17008524

Change-Id: I4c6a8239411c9227a75d05de9fc99bcd7e92ef73
parents e1d67bf1 e4796198
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);
            }