Merge "Adding NPE check when the system has no tasks." into mnc-dev
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user