diff options
| author | George Mount <mount@google.com> | 2015-07-15 14:12:26 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-15 14:12:28 +0000 |
| commit | 503ad9ee0d701d045c382cd534865f48f69c024b (patch) | |
| tree | 189d18122fde0961cd141467a0ef996745983395 /core/java/android | |
| parent | 94666b76988a6a6721a0d5c080f819580da912a2 (diff) | |
| parent | 80141d1c8b799cf7669a29b8837037cf3934ddb9 (diff) | |
| download | frameworks_base-503ad9ee0d701d045c382cd534865f48f69c024b.zip frameworks_base-503ad9ee0d701d045c382cd534865f48f69c024b.tar.gz frameworks_base-503ad9ee0d701d045c382cd534865f48f69c024b.tar.bz2 | |
Merge "Fix input pause without resume." into mnc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityTransitionCoordinator.java | 13 | ||||
| -rw-r--r-- | core/java/android/app/EnterTransitionCoordinator.java | 1 | ||||
| -rw-r--r-- | core/java/android/app/ExitTransitionCoordinator.java | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java index fa81412..e28fb20 100644 --- a/core/java/android/app/ActivityTransitionCoordinator.java +++ b/core/java/android/app/ActivityTransitionCoordinator.java @@ -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 { diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java index 05cf1d4..0745537 100644 --- a/core/java/android/app/EnterTransitionCoordinator.java +++ b/core/java/android/app/EnterTransitionCoordinator.java @@ -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); diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java index 9ddebb0..ad104a4 100644 --- a/core/java/android/app/ExitTransitionCoordinator.java +++ b/core/java/android/app/ExitTransitionCoordinator.java @@ -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); |
