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

Commit f8965523 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Adding NPE check when the system has no tasks." into mnc-dev

parents e3230ae2 65c29403
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;