Merge "Fix input pause without resume." into mnc-dev
This commit is contained in:
@@ -217,11 +217,6 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
|
||||
}
|
||||
|
||||
protected void viewsReady(ArrayMap<String, View> sharedElements) {
|
||||
final View decor = getDecor();
|
||||
final ViewRootImpl viewRoot = decor == null ? null : decor.getViewRootImpl();
|
||||
if (viewRoot != null) {
|
||||
viewRoot.setPausedForTransition(true);
|
||||
}
|
||||
sharedElements.retainAll(mAllSharedElementNames);
|
||||
if (mListener != null) {
|
||||
mListener.onMapSharedElements(mAllSharedElementNames, sharedElements);
|
||||
@@ -905,6 +900,14 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
protected void pauseInput() {
|
||||
final View decor = getDecor();
|
||||
final ViewRootImpl viewRoot = decor == null ? null : decor.getViewRootImpl();
|
||||
if (viewRoot != null) {
|
||||
viewRoot.setPausedForTransition(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void onTransitionsComplete() {}
|
||||
|
||||
protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
|
||||
|
||||
@@ -333,6 +333,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
|
||||
boolean startSharedElementTransition = true;
|
||||
setGhostVisibility(View.INVISIBLE);
|
||||
scheduleGhostVisibilityChange(View.INVISIBLE);
|
||||
pauseInput();
|
||||
Transition transition = beginTransition(decorView, startEnterTransition,
|
||||
startSharedElementTransition);
|
||||
scheduleGhostVisibilityChange(View.VISIBLE);
|
||||
|
||||
@@ -203,6 +203,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
|
||||
public void startExit() {
|
||||
if (!mIsExitStarted) {
|
||||
mIsExitStarted = true;
|
||||
pauseInput();
|
||||
ViewGroup decorView = getDecor();
|
||||
if (decorView != null) {
|
||||
decorView.suppressLayout(true);
|
||||
@@ -220,6 +221,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
|
||||
public void startExit(int resultCode, Intent data) {
|
||||
if (!mIsExitStarted) {
|
||||
mIsExitStarted = true;
|
||||
pauseInput();
|
||||
ViewGroup decorView = getDecor();
|
||||
if (decorView != null) {
|
||||
decorView.suppressLayout(true);
|
||||
|
||||
Reference in New Issue
Block a user