summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2016-10-28 12:52:04 +0200
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-11-04 13:16:40 -0700
commit17224324b86e0f5486741921355c29cd6baa0f51 (patch)
treed954977b05142b50322789e893898cef72ae12cb
parentce521ee7de0bf1264abe0cd399f59e505ff28005 (diff)
downloadframeworks_base-17224324b86e0f5486741921355c29cd6baa0f51.zip
frameworks_base-17224324b86e0f5486741921355c29cd6baa0f51.tar.gz
frameworks_base-17224324b86e0f5486741921355c29cd6baa0f51.tar.bz2
SystemUI: Fix possible NPE
isTaskAboveTask() results in an NPE if the caller is null. Wrap with null checks on lauchTargetTask and launchTargetTask.group to prevent this Change-Id: I372ea7744c67ddd11d9731e6bee1858d4dd3318c Reference: BugDumps 20161021-27 L#77
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 43b9a3e..454222c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -1018,8 +1018,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
t.setClipViewInStack(false);
t.startLaunchTaskAnimation(r, true, true, lockToTask);
} else {
- boolean occludesLaunchTarget = launchTargetTask.group.isTaskAboveTask(t.getTask(),
- launchTargetTask);
+ boolean occludesLaunchTarget = launchTargetTask != null &&
+ launchTargetTask.group != null &&
+ launchTargetTask.group.isTaskAboveTask(t.getTask(), launchTargetTask);
t.startLaunchTaskAnimation(null, false, occludesLaunchTarget, lockToTask);
}
}