Merge "Fixing crash in SysUI due to invalid group." into nyc-dev

This commit is contained in:
Winson Chung
2016-05-26 20:39:27 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ public class RecentsDebugFlags implements TunerService.Tunable {
public static final boolean DisableBackgroundCache = false; public static final boolean DisableBackgroundCache = false;
// Enables the task affiliations // Enables the task affiliations
public static final boolean EnableAffiliatedTaskGroups = false; public static final boolean EnableAffiliatedTaskGroups = false;
// TODO: To be repurposed // Enables the button above the stack
public static final boolean EnableStackActionButton = true; public static final boolean EnableStackActionButton = true;
// Overrides the Tuner flags and enables the timeout // Overrides the Tuner flags and enables the timeout
private static final boolean EnableFastToggleTimeout = false; private static final boolean EnableFastToggleTimeout = false;

View File

@@ -148,10 +148,12 @@ public class TaskStackAnimationHelper {
for (int i = taskViews.size() - 1; i >= 0; i--) { for (int i = taskViews.size() - 1; i >= 0; i--) {
TaskView tv = taskViews.get(i); TaskView tv = taskViews.get(i);
Task task = tv.getTask(); Task task = tv.getTask();
boolean currentTaskOccludesLaunchTarget = (launchTargetTask != null && boolean currentTaskOccludesLaunchTarget = launchTargetTask != null &&
launchTargetTask.group.isTaskAboveTask(task, launchTargetTask)); launchTargetTask.group != null &&
boolean hideTask = (launchTargetTask != null && launchTargetTask.group.isTaskAboveTask(task, launchTargetTask);
launchTargetTask.isFreeformTask() && task.isFreeformTask()); boolean hideTask = launchTargetTask != null &&
launchTargetTask.isFreeformTask() &&
task.isFreeformTask();
// Get the current transform for the task, which will be used to position it offscreen // Get the current transform for the task, which will be used to position it offscreen
stackLayout.getStackTransform(task, stackScroller.getStackScroll(), mTmpTransform, stackLayout.getStackTransform(task, stackScroller.getStackScroll(), mTmpTransform,
@@ -221,11 +223,9 @@ public class TaskStackAnimationHelper {
int taskIndexFromBack = i; int taskIndexFromBack = i;
final TaskView tv = taskViews.get(i); final TaskView tv = taskViews.get(i);
Task task = tv.getTask(); Task task = tv.getTask();
boolean currentTaskOccludesLaunchTarget = false; boolean currentTaskOccludesLaunchTarget = launchTargetTask != null &&
if (launchTargetTask != null) { launchTargetTask.group != null &&
currentTaskOccludesLaunchTarget = launchTargetTask.group.isTaskAboveTask(task, launchTargetTask.group.isTaskAboveTask(task, launchTargetTask);
launchTargetTask);
}
// Get the current transform for the task, which will be updated to the final transform // Get the current transform for the task, which will be updated to the final transform
// to animate to depending on how recents was invoked // to animate to depending on how recents was invoked
@@ -358,8 +358,9 @@ public class TaskStackAnimationHelper {
for (int i = 0; i < taskViewCount; i++) { for (int i = 0; i < taskViewCount; i++) {
TaskView tv = taskViews.get(i); TaskView tv = taskViews.get(i);
Task task = tv.getTask(); Task task = tv.getTask();
boolean currentTaskOccludesLaunchTarget = (launchingTask != null && boolean currentTaskOccludesLaunchTarget = launchingTask != null &&
launchingTask.group.isTaskAboveTask(task, launchingTask)); launchingTask.group != null &&
launchingTask.group.isTaskAboveTask(task, launchingTask);
if (tv == launchingTaskView) { if (tv == launchingTaskView) {
tv.setClipViewInStack(false); tv.setClipViewInStack(false);