Merge "Clean up some methods on the Pip interface" into tm-qpr-dev
This commit is contained in:
@@ -59,10 +59,15 @@ interface IPip {
|
|||||||
/**
|
/**
|
||||||
* Sets listener to get pinned stack animation callbacks.
|
* Sets listener to get pinned stack animation callbacks.
|
||||||
*/
|
*/
|
||||||
oneway void setPinnedStackAnimationListener(IPipAnimationListener listener) = 3;
|
oneway void setPipAnimationListener(IPipAnimationListener listener) = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the shelf height and visibility.
|
* Sets the shelf height and visibility.
|
||||||
*/
|
*/
|
||||||
oneway void setShelfHeight(boolean visible, int shelfHeight) = 4;
|
oneway void setShelfHeight(boolean visible, int shelfHeight) = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the next pip animation type to be the alpha animation.
|
||||||
|
*/
|
||||||
|
oneway void setPipAnimationTypeToAlpha() = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,15 +50,6 @@ public interface Pip {
|
|||||||
default void onSystemUiStateChanged(boolean isSysUiStateValid, int flag) {
|
default void onSystemUiStateChanged(boolean isSysUiStateValid, int flag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets both shelf visibility and its height.
|
|
||||||
*
|
|
||||||
* @param visible visibility of shelf.
|
|
||||||
* @param height to specify the height for shelf.
|
|
||||||
*/
|
|
||||||
default void setShelfHeight(boolean visible, int height) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the callback when {@link PipTaskOrganizer#isInPip()} state is changed.
|
* Set the callback when {@link PipTaskOrganizer#isInPip()} state is changed.
|
||||||
*
|
*
|
||||||
@@ -67,14 +58,6 @@ public interface Pip {
|
|||||||
*/
|
*/
|
||||||
default void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {}
|
default void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the pinned stack with {@link PipAnimationController.AnimationType}
|
|
||||||
*
|
|
||||||
* @param animationType The pre-defined {@link PipAnimationController.AnimationType}
|
|
||||||
*/
|
|
||||||
default void setPinnedStackAnimationType(int animationType) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when showing Pip menu.
|
* Called when showing Pip menu.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import static android.view.WindowManager.INPUT_CONSUMER_PIP;
|
|||||||
|
|
||||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_PIP_TRANSITION;
|
import static com.android.internal.jank.InteractionJankMonitor.CUJ_PIP_TRANSITION;
|
||||||
import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTaskPermission;
|
import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTaskPermission;
|
||||||
|
import static com.android.wm.shell.pip.PipAnimationController.ANIM_TYPE_ALPHA;
|
||||||
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_EXPAND_OR_UNEXPAND;
|
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_EXPAND_OR_UNEXPAND;
|
||||||
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP;
|
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP;
|
||||||
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN;
|
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN;
|
||||||
@@ -1064,13 +1065,6 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setShelfHeight(boolean visible, int height) {
|
|
||||||
mMainExecutor.execute(() -> {
|
|
||||||
PipController.this.setShelfHeight(visible, height);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {
|
public void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {
|
||||||
mMainExecutor.execute(() -> {
|
mMainExecutor.execute(() -> {
|
||||||
@@ -1078,13 +1072,6 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setPinnedStackAnimationType(int animationType) {
|
|
||||||
mMainExecutor.execute(() -> {
|
|
||||||
PipController.this.setPinnedStackAnimationType(animationType);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPipExclusionBoundsChangeListener(Consumer<Rect> listener) {
|
public void addPipExclusionBoundsChangeListener(Consumer<Rect> listener) {
|
||||||
mMainExecutor.execute(() -> {
|
mMainExecutor.execute(() -> {
|
||||||
@@ -1178,8 +1165,8 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPinnedStackAnimationListener(IPipAnimationListener listener) {
|
public void setPipAnimationListener(IPipAnimationListener listener) {
|
||||||
executeRemoteCallWithTaskPermission(mController, "setPinnedStackAnimationListener",
|
executeRemoteCallWithTaskPermission(mController, "setPipAnimationListener",
|
||||||
(controller) -> {
|
(controller) -> {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
mListener.register(listener);
|
mListener.register(listener);
|
||||||
@@ -1188,5 +1175,13 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPipAnimationTypeToAlpha() {
|
||||||
|
executeRemoteCallWithTaskPermission(mController, "setPipAnimationTypeToAlpha",
|
||||||
|
(controller) -> {
|
||||||
|
controller.setPinnedStackAnimationType(ANIM_TYPE_ALPHA);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,11 +81,6 @@ interface ISystemUiProxy {
|
|||||||
*/
|
*/
|
||||||
void stopScreenPinning() = 17;
|
void stopScreenPinning() = 17;
|
||||||
|
|
||||||
/*
|
|
||||||
* Notifies that the swipe-to-home (recents animation) is finished.
|
|
||||||
*/
|
|
||||||
void notifySwipeToHomeFinished() = 23;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies that quickstep will switch to a new task
|
* Notifies that quickstep will switch to a new task
|
||||||
* @param rotation indicates which Surface.Rotation the gesture was started in
|
* @param rotation indicates which Surface.Rotation the gesture was started in
|
||||||
|
|||||||
@@ -341,14 +341,6 @@ public class OverviewProxyService extends CurrentUserTracker implements
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void notifySwipeToHomeFinished() {
|
|
||||||
verifyCallerAndClearCallingIdentity("notifySwipeToHomeFinished", () ->
|
|
||||||
mPipOptional.ifPresent(
|
|
||||||
pip -> pip.setPinnedStackAnimationType(
|
|
||||||
PipAnimationController.ANIM_TYPE_ALPHA)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notifySwipeUpGestureStarted() {
|
public void notifySwipeUpGestureStarted() {
|
||||||
verifyCallerAndClearCallingIdentityPostMain("notifySwipeUpGestureStarted", () ->
|
verifyCallerAndClearCallingIdentityPostMain("notifySwipeUpGestureStarted", () ->
|
||||||
|
|||||||
Reference in New Issue
Block a user