Only notify the floating coordinator of new bounds if we're in PIP.

Fixes: 155389015
Test: manual, set breakpoint and observe onContentMoved is not called on config change if we're not in PIP.
Change-Id: Ic2066ed8c005149be6c568a710d2f0c98fa15f52
This commit is contained in:
Joshua Tsuji
2020-05-01 12:45:41 -04:00
parent 9975ac4156
commit 0d4cbebd0f
2 changed files with 8 additions and 1 deletions

View File

@@ -213,6 +213,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);
}
}
/**