diff options
| author | 2017-08-14 16:44:20 -0700 | |
|---|---|---|
| committer | 2017-08-14 23:51:35 +0000 | |
| commit | a9c4127ece9e72093685f33df9617b41d834ba03 (patch) | |
| tree | 7c42dee4501d96524de256cf3e872b703ce6bcfa | |
| parent | 21f3489653c3c481ddb7315089bdf1e5ae19f0cd (diff) | |
Add fallback to reset the waiting for transition state.
- When launching into recents directly in another orientation, it
appears that the animation start callback is not made, which then
causes the transition-waiting state to persist until Overview is
next hidden. As a fallback, if we get onEnterAnimationComplete()
on the activity, then the animation has started and completed, so
we can reset the state.
Bug: 64694148
Test: Launch fixed-portrait app, hold device in landscape and then hit
recents button, ensure that recents button still works after.
Change-Id: Ibac8554c1f71324838fef1f04db2d88b16ffe219
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index c0550b5c52e6..387527f95033 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -69,6 +69,7 @@ import com.android.systemui.recents.events.activity.ToggleRecentsEvent; import com.android.systemui.recents.events.component.ActivityUnpinnedEvent; import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent; import com.android.systemui.recents.events.component.ScreenPinningRequestEvent; +import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent; import com.android.systemui.recents.events.ui.AllTaskViewsDismissedEvent; import com.android.systemui.recents.events.ui.DeleteTaskDataEvent; import com.android.systemui.recents.events.ui.HideIncompatibleAppOverlayEvent; @@ -502,6 +503,11 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD public void onEnterAnimationComplete() { super.onEnterAnimationComplete(); EventBus.getDefault().send(new EnterRecentsWindowAnimationCompletedEvent()); + + // Workaround for b/64694148: The animation started callback is not made (see + // RecentsImpl.getThumbnailTransitionActivityOptions) so reset the transition-waiting state + // once the enter animation has completed. + EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false)); } @Override |