Merge "Provide mandatory gesture insets from the shell caption" into udc-qpr-dev am: ece7006fb0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23376881 Change-Id: Ic56a99de9469a0254681cc3fee08f912a7c9d281 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -248,6 +248,9 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
|
|||||||
mCaptionInsetsRect.bottom = mCaptionInsetsRect.top + captionHeight + params.mCaptionY;
|
mCaptionInsetsRect.bottom = mCaptionInsetsRect.top + captionHeight + params.mCaptionY;
|
||||||
wct.addInsetsSource(mTaskInfo.token,
|
wct.addInsetsSource(mTaskInfo.token,
|
||||||
mOwner, 0 /* index */, WindowInsets.Type.captionBar(), mCaptionInsetsRect);
|
mOwner, 0 /* index */, WindowInsets.Type.captionBar(), mCaptionInsetsRect);
|
||||||
|
wct.addInsetsSource(mTaskInfo.token,
|
||||||
|
mOwner, 0 /* index */, WindowInsets.Type.mandatorySystemGestures(),
|
||||||
|
mCaptionInsetsRect);
|
||||||
} else {
|
} else {
|
||||||
startT.hide(mCaptionContainerSurface);
|
startT.hide(mCaptionContainerSurface);
|
||||||
}
|
}
|
||||||
@@ -345,6 +348,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
|
|||||||
final WindowContainerTransaction wct = mWindowContainerTransactionSupplier.get();
|
final WindowContainerTransaction wct = mWindowContainerTransactionSupplier.get();
|
||||||
wct.removeInsetsSource(mTaskInfo.token,
|
wct.removeInsetsSource(mTaskInfo.token,
|
||||||
mOwner, 0 /* index */, WindowInsets.Type.captionBar());
|
mOwner, 0 /* index */, WindowInsets.Type.captionBar());
|
||||||
|
wct.removeInsetsSource(mTaskInfo.token,
|
||||||
|
mOwner, 0 /* index */, WindowInsets.Type.mandatorySystemGestures());
|
||||||
mTaskOrganizer.applyTransaction(wct);
|
mTaskOrganizer.applyTransaction(wct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,8 @@ public class WindowDecorationTests extends ShellTestCase {
|
|||||||
releaseOrder.verify(t).remove(captionContainerSurface);
|
releaseOrder.verify(t).remove(captionContainerSurface);
|
||||||
releaseOrder.verify(t).remove(decorContainerSurface);
|
releaseOrder.verify(t).remove(decorContainerSurface);
|
||||||
releaseOrder.verify(t).apply();
|
releaseOrder.verify(t).apply();
|
||||||
verify(mMockWindowContainerTransaction)
|
// Expect to remove two insets sources, the caption insets and the mandatory gesture insets.
|
||||||
|
verify(mMockWindowContainerTransaction, Mockito.times(2))
|
||||||
.removeInsetsSource(eq(taskInfo.token), any(), anyInt(), anyInt());
|
.removeInsetsSource(eq(taskInfo.token), any(), anyInt(), anyInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user