Merge changes Ib255e49f,Ifc33cdf7 into lmp-mr1-dev

* changes:
  Ensuring that the alpha and translation animation durations are the same. (Bug 18609321)
  Fix crash when user is both scrolling and tabbing through Recents. (Bug 18552776)
This commit is contained in:
Winson Chung
2014-12-04 00:07:55 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 4 deletions

View File

@@ -530,11 +530,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
/** Resets the focused task. */ /** Resets the focused task. */
void resetFocusedTask() { void resetFocusedTask() {
if ((mStack != null) && (0 <= mFocusedTaskIndex) && if ((0 <= mFocusedTaskIndex) && (mFocusedTaskIndex < mStack.getTaskCount())) {
(mFocusedTaskIndex < mStack.getTaskCount())) {
Task t = mStack.getTasks().get(mFocusedTaskIndex); Task t = mStack.getTasks().get(mFocusedTaskIndex);
TaskView tv = getChildViewForTask(t); TaskView tv = getChildViewForTask(t);
tv.unsetFocusedTask(); if (tv != null) {
tv.unsetFocusedTask();
}
} }
mFocusedTaskIndex = -1; mFocusedTaskIndex = -1;
} }

View File

@@ -118,7 +118,7 @@ public class AppTransition implements Dump {
private static final float RECENTS_THUMBNAIL_FADEOUT_FRACTION = 0.3f; private static final float RECENTS_THUMBNAIL_FADEOUT_FRACTION = 0.3f;
private static final int DEFAULT_APP_TRANSITION_DURATION = 250; private static final int DEFAULT_APP_TRANSITION_DURATION = 250;
private static final int THUMBNAIL_APP_TRANSITION_DURATION = 300; private static final int THUMBNAIL_APP_TRANSITION_DURATION = 325;
private static final int THUMBNAIL_APP_TRANSITION_ALPHA_DURATION = 325; private static final int THUMBNAIL_APP_TRANSITION_ALPHA_DURATION = 325;
private final Context mContext; private final Context mContext;