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

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

Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev

parents 4eb9a6db ac52f289
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ interface IWindowManager
    /**
     * Called by System UI to notify of changes to the visibility of PIP.
     */
    oneway void setTvPipVisibility(boolean visible);
    oneway void setPipVisibility(boolean visible);

    /**
     * Device has a software navigation bar (separate from the status bar).
+1 −1
Original line number Diff line number Diff line
@@ -1517,7 +1517,7 @@ public interface WindowManagerPolicy {
    /**
     * Called by System UI to notify of changes to the visibility of PIP.
     */
    public void setTvPipVisibilityLw(boolean visible);
    void setPipVisibilityLw(boolean visible);

    /**
     * Specifies whether there is an on-screen navigation bar separate from the status bar.
+2 −2
Original line number Diff line number Diff line
@@ -102,9 +102,9 @@ oneway interface IStatusBar
    void onCameraLaunchGestureDetected(int source);

    /**
     * Shows the TV's picture-in-picture menu if an activity is in picture-in-picture mode.
     * Shows the picture-in-picture menu if an activity is in picture-in-picture mode.
     */
    void showTvPictureInPictureMenu();
    void showPictureInPictureMenu();

    /**
     * Shows the global actions menu.
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import java.io.PrintWriter;

public interface  BasePipManager {
    void initialize(Context context);
    void showPictureInPictureMenu();
    void onConfigurationChanged();
    void dump(PrintWriter pw);
}
+9 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.res.Configuration;

import com.android.systemui.SystemUI;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.statusbar.CommandQueue;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -31,7 +32,7 @@ import java.io.PrintWriter;
/**
 * Controls the picture-in-picture window.
 */
public class PipUI extends SystemUI {
public class PipUI extends SystemUI implements CommandQueue.Callbacks {

    private BasePipManager mPipManager;

@@ -55,6 +56,13 @@ public class PipUI extends SystemUI {
                ? com.android.systemui.pip.tv.PipManager.getInstance()
                : com.android.systemui.pip.phone.PipManager.getInstance();
        mPipManager.initialize(mContext);

        getComponent(CommandQueue.class).addCallbacks(this);
    }

    @Override
    public void showPictureInPictureMenu() {
        mPipManager.showPictureInPictureMenu();
    }

    @Override
Loading