Merge "Fix pip window can't move in recents" into tm-dev
This commit is contained in:
@@ -573,7 +573,7 @@ final class InputMonitor {
|
|||||||
recentsAnimationController.getTargetAppDisplayArea();
|
recentsAnimationController.getTargetAppDisplayArea();
|
||||||
if (targetDA != null) {
|
if (targetDA != null) {
|
||||||
mRecentsAnimationInputConsumer.reparent(mInputTransaction, targetDA);
|
mRecentsAnimationInputConsumer.reparent(mInputTransaction, targetDA);
|
||||||
mRecentsAnimationInputConsumer.show(mInputTransaction, MAX_VALUE - 1);
|
mRecentsAnimationInputConsumer.show(mInputTransaction, MAX_VALUE - 2);
|
||||||
mAddRecentsAnimationInputConsumerHandle = false;
|
mAddRecentsAnimationInputConsumerHandle = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -584,12 +584,16 @@ final class InputMonitor {
|
|||||||
final Task rootTask = w.getTask().getRootTask();
|
final Task rootTask = w.getTask().getRootTask();
|
||||||
mPipInputConsumer.mWindowHandle.replaceTouchableRegionWithCrop(
|
mPipInputConsumer.mWindowHandle.replaceTouchableRegionWithCrop(
|
||||||
rootTask.getSurfaceControl());
|
rootTask.getSurfaceControl());
|
||||||
|
final DisplayArea targetDA = rootTask.getDisplayArea();
|
||||||
// We set the layer to z=MAX-1 so that it's always on top.
|
// We set the layer to z=MAX-1 so that it's always on top.
|
||||||
mPipInputConsumer.reparent(mInputTransaction, rootTask);
|
if (targetDA != null) {
|
||||||
|
mPipInputConsumer.layout(mInputTransaction, rootTask.getBounds());
|
||||||
|
mPipInputConsumer.reparent(mInputTransaction, targetDA);
|
||||||
mPipInputConsumer.show(mInputTransaction, MAX_VALUE - 1);
|
mPipInputConsumer.show(mInputTransaction, MAX_VALUE - 1);
|
||||||
mAddPipInputConsumerHandle = false;
|
mAddPipInputConsumerHandle = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mAddWallpaperInputConsumerHandle) {
|
if (mAddWallpaperInputConsumerHandle) {
|
||||||
if (w.mAttrs.type == TYPE_WALLPAPER && w.isVisible()) {
|
if (w.mAttrs.type == TYPE_WALLPAPER && w.isVisible()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user