summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/InsetsSourceProvider.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index b7eaf259ea7a..1a322ff0196f 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -272,15 +272,17 @@ class InsetsSourceProvider {
/** @return A new source computed by the specified window frame in the given display frames. */
InsetsSource createSimulatedSource(DisplayFrames displayFrames, Rect frame) {
- // Don't copy visible frame because it might not be calculated in the provided display
- // frames and it is not significant for this usage.
- final InsetsSource source = new InsetsSource(mSource.getId(), mSource.getType());
- source.setVisible(mSource.isVisible());
+ final InsetsSource source = new InsetsSource(mSource);
mTmpRect.set(frame);
if (mFrameProvider != null) {
mFrameProvider.apply(displayFrames, mWindowContainer, 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;
}