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

Commit d9413610 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove legacy callbacks between recents and split screen"

parents dcacf5b7 4fb0877a
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -161,10 +161,6 @@
    <!-- The number of milliseconds to extend ambient pulse by when prompted (e.g. on touch) -->
    <integer name="ambient_notification_extension_time">10000</integer>

    <!-- In multi-window, determines whether the stack where recents lives should grow from
         the smallest position when being launched. -->
    <bool name="recents_grow_in_multiwindow">true</bool>

    <!-- Animation duration when using long press on recents to dock -->
    <integer name="long_press_dock_anim_duration">250</integer>

+0 −4
Original line number Diff line number Diff line
@@ -65,10 +65,6 @@ public class Recents extends SystemUI implements CommandQueue.Callbacks {
        }
    }

    public void growRecents() {
        mImpl.growRecents();
    }

    @Override
    public void showRecentApps(boolean triggeredFromAltTab) {
        // Ensure the device has been provisioned before allowing the user to interact with
+2 −10
Original line number Diff line number Diff line
@@ -23,20 +23,16 @@ import android.content.Context;
import android.window.WindowContainerToken;

import com.android.systemui.SystemUI;
import com.android.systemui.recents.Recents;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.statusbar.policy.KeyguardStateController;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Optional;
import java.util.function.Consumer;

import javax.inject.Singleton;

import dagger.Lazy;

/**
 * Controls the docked stack divider.
 */
@@ -44,15 +40,12 @@ import dagger.Lazy;
public class Divider extends SystemUI {
    private final KeyguardStateController mKeyguardStateController;
    private final DividerController mDividerController;
    private final Optional<Lazy<Recents>> mRecentsOptionalLazy;

    Divider(Context context, DividerController dividerController,
            KeyguardStateController keyguardStateController,
            Optional<Lazy<Recents>> recentsOptionalLazy) {
            KeyguardStateController keyguardStateController) {
        super(context);
        mDividerController = dividerController;
        mKeyguardStateController = keyguardStateController;
        mRecentsOptionalLazy = recentsOptionalLazy;
    }

    @Override
@@ -113,8 +106,7 @@ public class Divider extends SystemUI {
    }

    public void onRecentsDrawn() {
        mDividerController.onRecentsDrawn(() -> mRecentsOptionalLazy.ifPresent(
                recentsLazy -> recentsLazy.get().growRecents()));
        mDividerController.onRecentsDrawn();
    }

    public void onDockedFirstAnimationFrame() {
+2 −2
Original line number Diff line number Diff line
@@ -391,9 +391,9 @@ public class DividerController implements DividerView.DividerCallbacks,
     * subscriber, or DividerView, which has been removed and prevented from resizing. Instead,
     * register the event handler here and proxy the event to the current DividerView.
     */
    public void onRecentsDrawn(DividerView.RecentDrawnCallback callback) {
    public void onRecentsDrawn() {
        if (mView != null) {
            mView.onRecentsDrawn(callback);
            mView.onRecentsDrawn();
        }
    }

+3 −9
Original line number Diff line number Diff line
@@ -20,18 +20,14 @@ import android.content.Context;
import android.os.Handler;

import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.recents.Recents;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.common.DisplayImeController;
import com.android.wm.shell.common.SystemWindows;
import com.android.wm.shell.common.TransactionPool;

import java.util.Optional;

import javax.inject.Singleton;

import dagger.Lazy;
import dagger.Module;
import dagger.Provides;

@@ -42,14 +38,12 @@ import dagger.Provides;
public class DividerModule {
    @Singleton
    @Provides
    static Divider provideDivider(Context context, Optional<Lazy<Recents>> recentsOptionalLazy,
            DisplayController displayController, SystemWindows systemWindows,
            DisplayImeController imeController, @Main Handler handler,
    static Divider provideDivider(Context context, DisplayController displayController,
            SystemWindows systemWindows, DisplayImeController imeController, @Main Handler handler,
            KeyguardStateController keyguardStateController, TransactionPool transactionPool) {
        // TODO(b/161116823): fetch DividerProxy from WM shell lib.
        DividerController dividerController = new DividerController(context, displayController,
                systemWindows, imeController, handler, transactionPool);
        return new Divider(context, dividerController, keyguardStateController,
                recentsOptionalLazy);
        return new Divider(context, dividerController, keyguardStateController);
    }
}
Loading