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

Commit f9f8be93 authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Cleanup IPinnedStackController and IPinnedStackListener 2/N"

parents 1599b648 f1de2b6e
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -57,19 +57,6 @@ oneway interface IPinnedStackListener {
     */
    void onActivityHidden(in ComponentName componentName);

    /**
     * Called when the window manager has detected change on DisplayInfo,  or
     * when the listener is first registered to allow the listener to synchronized its state with
     * the controller.
     */
    void onDisplayInfoChanged(in DisplayInfo displayInfo);

    /**
     * Called by the window manager at the beginning of a configuration update cascade
     * since the metrics from these resources are used for bounds calculations.
     */
    void onConfigurationChanged();

    /**
     * Called by the window manager when the aspect ratio is reset.
     */
+0 −31
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.app.RemoteAction;
import android.content.ComponentName;
import android.content.pm.ParceledListSlice;
import android.os.RemoteException;
import android.view.DisplayInfo;
import android.view.IPinnedStackListener;
import android.view.WindowManagerGlobal;

@@ -85,18 +84,6 @@ public class PinnedStackListenerForwarder {
        }
    }

    private void onDisplayInfoChanged(DisplayInfo displayInfo) {
        for (PinnedStackListener listener : mListeners) {
            listener.onDisplayInfoChanged(displayInfo);
        }
    }

    private void onConfigurationChanged() {
        for (PinnedStackListener listener : mListeners) {
            listener.onConfigurationChanged();
        }
    }

    private void onAspectRatioChanged(float aspectRatio) {
        for (PinnedStackListener listener : mListeners) {
            listener.onAspectRatioChanged(aspectRatio);
@@ -133,20 +120,6 @@ public class PinnedStackListenerForwarder {
            });
        }

        @Override
        public void onDisplayInfoChanged(DisplayInfo displayInfo) {
            mShellMainExecutor.execute(() -> {
                PinnedStackListenerForwarder.this.onDisplayInfoChanged(displayInfo);
            });
        }

        @Override
        public void onConfigurationChanged() {
            mShellMainExecutor.execute(() -> {
                PinnedStackListenerForwarder.this.onConfigurationChanged();
            });
        }

        @Override
        public void onAspectRatioChanged(float aspectRatio) {
            mShellMainExecutor.execute(() -> {
@@ -168,10 +141,6 @@ public class PinnedStackListenerForwarder {

        public void onActivityHidden(ComponentName componentName) {}

        public void onDisplayInfoChanged(DisplayInfo displayInfo) {}

        public void onConfigurationChanged() {}

        public void onAspectRatioChanged(float aspectRatio) {}
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.Nullable;
import android.app.PictureInPictureParams;
import android.content.ComponentName;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Rect;

import com.android.wm.shell.common.annotations.ExternalThread;
@@ -81,6 +82,12 @@ public interface Pip {
    default void movePipToFullscreen() {
    }

    /**
     * Called when configuration is changed.
     */
    default void onConfigurationChanged(Configuration newConfig) {
    }

    /**
     * Called when display size or font size of settings changed
     */
+1 −3
Original line number Diff line number Diff line
@@ -102,9 +102,7 @@ public class PipBoundsAlgorithm {
        return mSnapAlgorithm;
    }

    /**
     * Responds to IPinnedStackListener on configuration change.
     */
    /** Responds to configuration change. */
    public void onConfigurationChanged(Context context) {
        reloadResources(context);
    }
+0 −1
Original line number Diff line number Diff line
@@ -502,7 +502,6 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,

        mPipMenuController.attach(leash);


        if (mShouldIgnoreEnteringPipTransition) {
            final Rect destinationBounds = mPipBoundsState.getBounds();
            // animation is finished in the Launcher and here we directly apply the final touch.
Loading