Merge "Fully null check mRecentsAnimationController" into sc-dev am: d61f224570
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15147296 Change-Id: Ie6cdb362ed480068fc1793ee454c3a3648a64061
This commit is contained in:
@@ -140,7 +140,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
private final ArrayList<Runnable> mRecentsAnimationStartCallbacks = new ArrayList<>();
|
private final ArrayList<Runnable> mRecentsAnimationStartCallbacks = new ArrayList<>();
|
||||||
private final OnScrollChangedListener mOnRecentsScrollListener = this::onRecentsViewScroll;
|
private final OnScrollChangedListener mOnRecentsScrollListener = this::onRecentsViewScroll;
|
||||||
|
|
||||||
protected RecentsAnimationController mRecentsAnimationController;
|
// Null if the recents animation hasn't started yet or has been canceled or finished.
|
||||||
|
protected @Nullable RecentsAnimationController mRecentsAnimationController;
|
||||||
protected RecentsAnimationTargets mRecentsAnimationTargets;
|
protected RecentsAnimationTargets mRecentsAnimationTargets;
|
||||||
protected T mActivity;
|
protected T mActivity;
|
||||||
protected Q mRecentsView;
|
protected Q mRecentsView;
|
||||||
@@ -1353,8 +1354,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
private void resumeLastTask() {
|
private void resumeLastTask() {
|
||||||
mRecentsAnimationController.finish(false /* toRecents */, null);
|
if (mRecentsAnimationController != null) {
|
||||||
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation", false);
|
mRecentsAnimationController.finish(false /* toRecents */, null);
|
||||||
|
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation", false);
|
||||||
|
}
|
||||||
doLogGesture(LAST_TASK, null);
|
doLogGesture(LAST_TASK, null);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
@@ -1662,13 +1665,17 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mActivityInterface.onLaunchTaskFailed();
|
mActivityInterface.onLaunchTaskFailed();
|
||||||
mRecentsAnimationController.finish(true /* toRecents */, null);
|
if (mRecentsAnimationController != null) {
|
||||||
|
mRecentsAnimationController.finish(true /* toRecents */, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, true /* freezeTaskList */);
|
}, true /* freezeTaskList */);
|
||||||
} else {
|
} else {
|
||||||
mActivityInterface.onLaunchTaskFailed();
|
mActivityInterface.onLaunchTaskFailed();
|
||||||
Toast.makeText(mContext, R.string.activity_not_available, LENGTH_SHORT).show();
|
Toast.makeText(mContext, R.string.activity_not_available, LENGTH_SHORT).show();
|
||||||
mRecentsAnimationController.finish(true /* toRecents */, null);
|
if (mRecentsAnimationController != null) {
|
||||||
|
mRecentsAnimationController.finish(true /* toRecents */, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mCanceled = false;
|
mCanceled = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user