Merge "Only notify the floating coordinator of new bounds if we're in PIP." into rvc-dev

This commit is contained in:
Josh Tsuji
2020-05-01 20:59:53 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 1 deletions

View File

@@ -214,6 +214,10 @@ public class PipTaskOrganizer extends TaskOrganizer {
return new Rect(mLastReportedBounds);
}
public boolean isInPip() {
return mInPip;
}
/**
* Registers {@link PipTransitionCallback} to receive transition callbacks.
*/

View File

@@ -168,7 +168,10 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
void synchronizePinnedStackBounds() {
cancelAnimations();
mBounds.set(mPipTaskOrganizer.getLastReportedBounds());
mFloatingContentCoordinator.onContentMoved(this);
if (mPipTaskOrganizer.isInPip()) {
mFloatingContentCoordinator.onContentMoved(this);
}
}
/**