Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872efe45 authored by Dake Gu's avatar Dake Gu
Browse files

ActivityTransition: fix activity not finished on back

Fixed two corner cases that called activity is not finished
on back when there is no shared element in calling activity due
to "Do not keep activity" option re-creates calling activity.

b/17333777

Change-Id: I66567efcce39b301b0febd1ce7a5d67b9ff73c3c
parent bd693784
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {

    private void sendSharedElementDestination() {
        boolean allReady;
        if (allowOverlappingTransitions()) {
        if (allowOverlappingTransitions() && getEnterViewsTransition() != null) {
            allReady = false;
        } else {
            allReady = !getDecor().isLayoutRequested();
+2 −1
Original line number Diff line number Diff line
@@ -139,7 +139,8 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
        if (getDecor() != null) {
            getDecor().suppressLayout(true);
        }
        if (!mSharedElements.isEmpty() && getSharedElementTransition() != null) {
        if (mExitSharedElementBundle != null && !mExitSharedElementBundle.isEmpty() &&
                !mSharedElements.isEmpty() && getSharedElementTransition() != null) {
            startTransition(new Runnable() {
                public void run() {
                    startSharedElementExit();