Merge "Don't move PiP if keyguard is showing or animating." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
de264b4273
@@ -161,6 +161,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
this::onKeepClearAreasChangedCallback;
|
this::onKeepClearAreasChangedCallback;
|
||||||
|
|
||||||
private void onKeepClearAreasChangedCallback() {
|
private void onKeepClearAreasChangedCallback() {
|
||||||
|
if (mIsKeyguardShowingOrAnimating) {
|
||||||
|
// early bail out if the change was caused by keyguard showing up
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!mEnablePipKeepClearAlgorithm) {
|
if (!mEnablePipKeepClearAlgorithm) {
|
||||||
// early bail out if the keep clear areas feature is disabled
|
// early bail out if the keep clear areas feature is disabled
|
||||||
return;
|
return;
|
||||||
@@ -186,6 +190,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
// early bail out if the keep clear areas feature is disabled
|
// early bail out if the keep clear areas feature is disabled
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mIsKeyguardShowingOrAnimating) {
|
||||||
|
// early bail out if the change was caused by keyguard showing up
|
||||||
|
return;
|
||||||
|
}
|
||||||
// only move if we're in PiP or transitioning into PiP
|
// only move if we're in PiP or transitioning into PiP
|
||||||
if (!mPipTransitionState.shouldBlockResizeRequest()) {
|
if (!mPipTransitionState.shouldBlockResizeRequest()) {
|
||||||
Rect destBounds = mPipKeepClearAlgorithm.adjust(mPipBoundsState,
|
Rect destBounds = mPipKeepClearAlgorithm.adjust(mPipBoundsState,
|
||||||
@@ -635,9 +643,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
DisplayLayout pendingLayout =
|
DisplayLayout pendingLayout =
|
||||||
mDisplayController.getDisplayLayout(mPipBoundsState.getDisplayId());
|
mDisplayController.getDisplayLayout(mPipBoundsState.getDisplayId());
|
||||||
if (mIsInFixedRotation
|
if (mIsInFixedRotation
|
||||||
|
|| mIsKeyguardShowingOrAnimating
|
||||||
|| pendingLayout.rotation()
|
|| pendingLayout.rotation()
|
||||||
!= mPipBoundsState.getDisplayLayout().rotation()) {
|
!= mPipBoundsState.getDisplayLayout().rotation()) {
|
||||||
// bail out if there is a pending rotation or fixed rotation change
|
// bail out if there is a pending rotation or fixed rotation change or
|
||||||
|
// there's a keyguard present
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int oldMaxMovementBound = mPipBoundsState.getMovementBounds().bottom;
|
int oldMaxMovementBound = mPipBoundsState.getMovementBounds().bottom;
|
||||||
@@ -931,10 +941,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
mPipBoundsState.getDisplayBounds().right,
|
mPipBoundsState.getDisplayBounds().right,
|
||||||
mPipBoundsState.getDisplayBounds().bottom);
|
mPipBoundsState.getDisplayBounds().bottom);
|
||||||
mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
|
mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
|
||||||
updatePipPositionForKeepClearAreas();
|
|
||||||
} else {
|
} else {
|
||||||
mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
|
mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
|
||||||
}
|
}
|
||||||
|
updatePipPositionForKeepClearAreas();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setLauncherAppIconSize(int iconSizePx) {
|
private void setLauncherAppIconSize(int iconSizePx) {
|
||||||
|
|||||||
Reference in New Issue
Block a user