Merge "Use the copy constructor to create simulated sources" into udc-dev am: 80ed45a7a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23487478 Change-Id: I57a91213193cf2512a9597987e8fefc11bfecc6c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -272,15 +272,17 @@ class InsetsSourceProvider {
|
|||||||
|
|
||||||
/** @return A new source computed by the specified window frame in the given display frames. */
|
/** @return A new source computed by the specified window frame in the given display frames. */
|
||||||
InsetsSource createSimulatedSource(DisplayFrames displayFrames, Rect frame) {
|
InsetsSource createSimulatedSource(DisplayFrames displayFrames, Rect frame) {
|
||||||
// Don't copy visible frame because it might not be calculated in the provided display
|
final InsetsSource source = new InsetsSource(mSource);
|
||||||
// frames and it is not significant for this usage.
|
|
||||||
final InsetsSource source = new InsetsSource(mSource.getId(), mSource.getType());
|
|
||||||
source.setVisible(mSource.isVisible());
|
|
||||||
mTmpRect.set(frame);
|
mTmpRect.set(frame);
|
||||||
if (mFrameProvider != null) {
|
if (mFrameProvider != null) {
|
||||||
mFrameProvider.apply(displayFrames, mWindowContainer, mTmpRect);
|
mFrameProvider.apply(displayFrames, mWindowContainer, mTmpRect);
|
||||||
}
|
}
|
||||||
source.setFrame(mTmpRect);
|
source.setFrame(mTmpRect);
|
||||||
|
|
||||||
|
// Don't copy visible frame because it might not be calculated in the provided display
|
||||||
|
// frames and it is not significant for this usage.
|
||||||
|
source.setVisibleFrame(null);
|
||||||
|
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user