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

Commit 3ca1028e authored by Winson's avatar Winson
Browse files

Closing system windows when dismissing recents to app or home.

Bug: 28314924
Change-Id: I35f484c7c594bb39d7983965e0f706175cf92253
parent fc48b072
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -223,13 +223,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
                new DismissRecentsToHomeAnimationStarted(animateTaskViews);
        dismissEvent.addPostAnimationCallback(new LaunchHomeRunnable(mHomeIntent,
                overrideAnimation));
        dismissEvent.addPostAnimationCallback(new Runnable() {
            @Override
            public void run() {
        Recents.getSystemServices().sendCloseSystemWindows(
                BaseStatusBar.SYSTEM_DIALOG_REASON_HOME_KEY);
            }
        });
        EventBus.getDefault().send(dismissEvent);
    }

+3 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.statusbar.BaseStatusBar;

import java.util.ArrayList;
import java.util.Collections;
@@ -167,6 +168,8 @@ public class RecentsTransitionHelper {
                        animStartedListener);
            }
        }
        Recents.getSystemServices().sendCloseSystemWindows(
                BaseStatusBar.SYSTEM_DIALOG_REASON_HOME_KEY);
    }

    public IRemoteCallback wrapStartedListener(final OnAnimationStartedListener listener) {
@@ -284,7 +287,6 @@ public class RecentsTransitionHelper {
        }

        // Calculate the offscreen task rect (for tasks that are not backed by views)
        float stackScroll = stackView.getScroller().getStackScroll();
        TaskView taskView = stackView.getChildViewForTask(task);
        TaskStackLayoutAlgorithm stackLayout = stackView.getStackAlgorithm();
        Rect offscreenTaskRect = new Rect();