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

Commit 296cc17a authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fix Recents regressions"

parents 357ae212 dff7a739
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ oneway interface IStatusBar
            boolean showImeSwitcher);
    void setWindowState(int window, int state);

    void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
    void showRecentApps(boolean triggeredFromAltTab);
    void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
    void toggleRecentApps();
    void toggleSplitScreen();
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import android.view.Display;
import android.view.View;

public interface RecentsComponent {
    void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
    void showRecentApps(boolean triggeredFromAltTab);
    void showNextAffiliatedTask();
    void showPrevAffiliatedTask();

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ oneway interface IRecentsNonSystemUserCallbacks {
    void preloadRecents();
    void cancelPreloadingRecents();
    void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate,
            boolean reloadTasks, boolean fromHome, int recentsGrowTarget);
            int recentsGrowTarget);
    void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
    void toggleRecents(int recentsGrowTarget);
    void onConfigurationChanged();
+3 −4
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ public class Recents extends SystemUI
     * Shows the Recents.
     */
    @Override
    public void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
    public void showRecentApps(boolean triggeredFromAltTab) {
        // Ensure the device has been provisioned before allowing the user to interact with
        // recents
        if (!isUserSetup()) {
@@ -252,7 +252,7 @@ public class Recents extends SystemUI
        int currentUser = sSystemServicesProxy.getCurrentUser();
        if (sSystemServicesProxy.isSystemUser(currentUser)) {
            mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
                    true /* animate */, false /* reloadTasks */, fromHome, recentsGrowTarget);
                    true /* animate */, recentsGrowTarget);
        } else {
            if (mSystemToUserCallbacks != null) {
                IRecentsNonSystemUserCallbacks callbacks =
@@ -260,8 +260,7 @@ public class Recents extends SystemUI
                if (callbacks != null) {
                    try {
                        callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
                                true /* animate */, false /* reloadTasks */, fromHome,
                                recentsGrowTarget);
                                true /* animate */, recentsGrowTarget);
                    } catch (RemoteException e) {
                        Log.e(TAG, "Callback failed", e);
                    }
+8 −12
Original line number Diff line number Diff line
@@ -356,15 +356,15 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        registerReceiver(mSystemBroadcastReceiver, filter);

        getWindow().addPrivateFlags(LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION);

        // Reload the stack view
        reloadStackView();
    }

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

        // Reload the stack view whenever we are made visible again
        reloadStackView();

        // Notify that recents is now visible
        EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, true));
        MetricsLogger.visible(this, MetricsEvent.OVERVIEW_ACTIVITY);
@@ -411,14 +411,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        }
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);

        // Reload the stack view
        reloadStackView();
    }

    /**
     * Reloads the stack views upon launching Recents.
     */
@@ -530,8 +522,12 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        // Set the window background
        mRecentsView.updateBackgroundScrim(getWindow(), isInMultiWindowMode);

        // Reload the task stack view if we are still visible to pick up the change in tasks that
        // result from entering/exiting multi-window
        if (mIsVisible) {
            reloadTaskStack(isInMultiWindowMode, true /* sendConfigChangedEvent */);
        }
    }

    @Override
    protected void onStop() {
Loading