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

Commit bef237d1 authored by Matthew Ng's avatar Matthew Ng Committed by android-build-merger
Browse files

Merge "Fixes recents from disappearing when split and restarted" into oc-mr1-dev am: f49f8f6f

am: a659bb95

Change-Id: I17aa02521a8226929fc04ccd36bf895351e10cfc
parents 03f08431 a659bb95
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -404,6 +404,17 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD


        // Notify of the next draw
        // Notify of the next draw
        mRecentsView.getViewTreeObserver().addOnPreDrawListener(mRecentsDrawnEventListener);
        mRecentsView.getViewTreeObserver().addOnPreDrawListener(mRecentsDrawnEventListener);

        // If Recents was restarted, then it should complete the enter animation with partially
        // reset launch state with dock, app and home set to false
        Object isRelaunching = getLastNonConfigurationInstance();
        if (isRelaunching != null && isRelaunching instanceof Boolean && (boolean) isRelaunching) {
            RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
            launchState.launchedViaDockGesture = false;
            launchState.launchedFromApp = false;
            launchState.launchedFromHome = false;
            onEnterAnimationComplete();
        }
    }
    }


    @Override
    @Override
@@ -508,6 +519,11 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        EventBus.getDefault().send(new EnterRecentsWindowAnimationCompletedEvent());
        EventBus.getDefault().send(new EnterRecentsWindowAnimationCompletedEvent());
    }
    }


    @Override
    public Object onRetainNonConfigurationInstance() {
        return true;
    }

    @Override
    @Override
    protected void onPause() {
    protected void onPause() {
        super.onPause();
        super.onPause();