Merge "Updating launcher for pip interface cleanup" into tm-qpr-dev am: a5846c9868
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20106888 Change-Id: I8648bf54cadd21aef823e7881b67e84d6a34f172 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1010,8 +1010,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
switch (endTarget) {
|
switch (endTarget) {
|
||||||
case HOME:
|
case HOME:
|
||||||
mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT);
|
mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT);
|
||||||
// Notify swipe-to-home (recents animation) is finished
|
// Notify the SysUI to use fade-in animation when entering PiP
|
||||||
SystemUiProxy.INSTANCE.get(mContext).notifySwipeToHomeFinished();
|
SystemUiProxy.INSTANCE.get(mContext).setPipAnimationTypeToAlpha();
|
||||||
break;
|
break;
|
||||||
case RECENTS:
|
case RECENTS:
|
||||||
mStateCallback.setState(STATE_SCALED_CONTROLLER_RECENTS | STATE_CAPTURE_SCREENSHOT
|
mStateCallback.setState(STATE_SCALED_CONTROLLER_RECENTS | STATE_CAPTURE_SCREENSHOT
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
linkToDeath();
|
linkToDeath();
|
||||||
// re-attach the listeners once missing due to setProxy has not been initialized yet.
|
// re-attach the listeners once missing due to setProxy has not been initialized yet.
|
||||||
if (mPipAnimationListener != null && mPip != null) {
|
if (mPipAnimationListener != null && mPip != null) {
|
||||||
setPinnedStackAnimationListener(mPipAnimationListener);
|
setPipAnimationListener(mPipAnimationListener);
|
||||||
}
|
}
|
||||||
if (mSplitScreenListener != null && mSplitScreen != null) {
|
if (mSplitScreenListener != null && mSplitScreen != null) {
|
||||||
registerSplitScreenListener(mSplitScreenListener);
|
registerSplitScreenListener(mSplitScreenListener);
|
||||||
@@ -357,20 +357,6 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Notifies that swipe-to-home action is finished.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void notifySwipeToHomeFinished() {
|
|
||||||
if (mSystemUiProxy != null) {
|
|
||||||
try {
|
|
||||||
mSystemUiProxy.notifySwipeToHomeFinished();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.w(TAG, "Failed call notifySwipeToHomeFinished", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notifyPrioritizedRotation(int rotation) {
|
public void notifyPrioritizedRotation(int rotation) {
|
||||||
if (mSystemUiProxy != null) {
|
if (mSystemUiProxy != null) {
|
||||||
@@ -475,12 +461,12 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets listener to get pinned stack animation callbacks.
|
* Sets listener to get pip animation callbacks.
|
||||||
*/
|
*/
|
||||||
public void setPinnedStackAnimationListener(IPipAnimationListener listener) {
|
public void setPipAnimationListener(IPipAnimationListener listener) {
|
||||||
if (mPip != null) {
|
if (mPip != null) {
|
||||||
try {
|
try {
|
||||||
mPip.setPinnedStackAnimationListener(listener);
|
mPip.setPipAnimationListener(listener);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed call setPinnedStackAnimationListener", e);
|
Log.w(TAG, "Failed call setPinnedStackAnimationListener", e);
|
||||||
}
|
}
|
||||||
@@ -522,6 +508,19 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the next pip animation type to be the alpha animation.
|
||||||
|
*/
|
||||||
|
public void setPipAnimationTypeToAlpha() {
|
||||||
|
if (mPip != null) {
|
||||||
|
try {
|
||||||
|
mPip.setPipAnimationTypeToAlpha();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.w(TAG, "Failed call setPipAnimationTypeToAlpha", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Splitscreen
|
// Splitscreen
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -941,7 +941,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||||||
.setSyncTransactionApplier(mSyncTransactionApplier));
|
.setSyncTransactionApplier(mSyncTransactionApplier));
|
||||||
RecentsModel.INSTANCE.get(getContext()).addThumbnailChangeListener(this);
|
RecentsModel.INSTANCE.get(getContext()).addThumbnailChangeListener(this);
|
||||||
mIPipAnimationListener.setActivityAndRecentsView(mActivity, this);
|
mIPipAnimationListener.setActivityAndRecentsView(mActivity, this);
|
||||||
SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(
|
SystemUiProxy.INSTANCE.get(getContext()).setPipAnimationListener(
|
||||||
mIPipAnimationListener);
|
mIPipAnimationListener);
|
||||||
mOrientationState.initListeners();
|
mOrientationState.initListeners();
|
||||||
SplitScreenBounds.INSTANCE.addOnChangeListener(this);
|
SplitScreenBounds.INSTANCE.addOnChangeListener(this);
|
||||||
@@ -960,7 +960,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||||||
.setSyncTransactionApplier(null));
|
.setSyncTransactionApplier(null));
|
||||||
executeSideTaskLaunchCallback();
|
executeSideTaskLaunchCallback();
|
||||||
RecentsModel.INSTANCE.get(getContext()).removeThumbnailChangeListener(this);
|
RecentsModel.INSTANCE.get(getContext()).removeThumbnailChangeListener(this);
|
||||||
SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(null);
|
SystemUiProxy.INSTANCE.get(getContext()).setPipAnimationListener(null);
|
||||||
SplitScreenBounds.INSTANCE.removeOnChangeListener(this);
|
SplitScreenBounds.INSTANCE.removeOnChangeListener(this);
|
||||||
mIPipAnimationListener.setActivityAndRecentsView(null, null);
|
mIPipAnimationListener.setActivityAndRecentsView(null, null);
|
||||||
mOrientationState.destroyListeners();
|
mOrientationState.destroyListeners();
|
||||||
@@ -4722,7 +4722,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||||||
if (sendUserLeaveHint) {
|
if (sendUserLeaveHint) {
|
||||||
// Notify the SysUI to use fade-in animation when entering PiP from live tile.
|
// Notify the SysUI to use fade-in animation when entering PiP from live tile.
|
||||||
final SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get(getContext());
|
final SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get(getContext());
|
||||||
systemUiProxy.notifySwipeToHomeFinished();
|
systemUiProxy.setPipAnimationTypeToAlpha();
|
||||||
systemUiProxy.setShelfHeight(true, mActivity.getDeviceProfile().hotseatBarSizePx);
|
systemUiProxy.setShelfHeight(true, mActivity.getDeviceProfile().hotseatBarSizePx);
|
||||||
// Transaction to hide the task to avoid flicker for entering PiP from split-screen.
|
// Transaction to hide the task to avoid flicker for entering PiP from split-screen.
|
||||||
// See also {@link AbsSwipeUpHandler#maybeFinishSwipeToHome}.
|
// See also {@link AbsSwipeUpHandler#maybeFinishSwipeToHome}.
|
||||||
|
|||||||
Reference in New Issue
Block a user