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

Commit 65c29403 authored by Winson Chung's avatar Winson Chung
Browse files

Adding NPE check when the system has no tasks.

Bug: 20640135
Change-Id: Ifb62d18dbf2125bc33325b7c2f2a44da51309325
parent 8141d6e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ public class SystemServicesProxy {
    /** Returns the top task. */
    public ActivityManager.RunningTaskInfo getTopMostTask() {
        List<ActivityManager.RunningTaskInfo> tasks = getRunningTasks(1);
        if (!tasks.isEmpty()) {
        if (tasks != null && !tasks.isEmpty()) {
            return tasks.get(0);
        }
        return null;