am 60ca7690: am b72c1579: am 91202e59: am 503ad9ee: Merge "Fix input pause without resume." into mnc-dev
* commit '60ca7690bc556abe71869b05304ee469fa9546c5': Fix input pause without resume.
This commit is contained in:
@@ -217,11 +217,6 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void viewsReady(ArrayMap<String, View> sharedElements) {
|
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);
|
sharedElements.retainAll(mAllSharedElementNames);
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
mListener.onMapSharedElements(mAllSharedElementNames, sharedElements);
|
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 void onTransitionsComplete() {}
|
||||||
|
|
||||||
protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
|
protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
|
|||||||
boolean startSharedElementTransition = true;
|
boolean startSharedElementTransition = true;
|
||||||
setGhostVisibility(View.INVISIBLE);
|
setGhostVisibility(View.INVISIBLE);
|
||||||
scheduleGhostVisibilityChange(View.INVISIBLE);
|
scheduleGhostVisibilityChange(View.INVISIBLE);
|
||||||
|
pauseInput();
|
||||||
Transition transition = beginTransition(decorView, startEnterTransition,
|
Transition transition = beginTransition(decorView, startEnterTransition,
|
||||||
startSharedElementTransition);
|
startSharedElementTransition);
|
||||||
scheduleGhostVisibilityChange(View.VISIBLE);
|
scheduleGhostVisibilityChange(View.VISIBLE);
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
|
|||||||
public void startExit() {
|
public void startExit() {
|
||||||
if (!mIsExitStarted) {
|
if (!mIsExitStarted) {
|
||||||
mIsExitStarted = true;
|
mIsExitStarted = true;
|
||||||
|
pauseInput();
|
||||||
ViewGroup decorView = getDecor();
|
ViewGroup decorView = getDecor();
|
||||||
if (decorView != null) {
|
if (decorView != null) {
|
||||||
decorView.suppressLayout(true);
|
decorView.suppressLayout(true);
|
||||||
@@ -220,6 +221,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
|
|||||||
public void startExit(int resultCode, Intent data) {
|
public void startExit(int resultCode, Intent data) {
|
||||||
if (!mIsExitStarted) {
|
if (!mIsExitStarted) {
|
||||||
mIsExitStarted = true;
|
mIsExitStarted = true;
|
||||||
|
pauseInput();
|
||||||
ViewGroup decorView = getDecor();
|
ViewGroup decorView = getDecor();
|
||||||
if (decorView != null) {
|
if (decorView != null) {
|
||||||
decorView.suppressLayout(true);
|
decorView.suppressLayout(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user