From b92aa02f816fac28d9184ddfee3fce76e17ee5aa Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Fri, 16 Nov 2018 15:46:50 +0800 Subject: [PATCH] Fix application got cropped after reparented to other displays A task opening animation was started while launching an activity on secondary display. The AppWindowToken surface of the opening app was cropped based on the display size. So, part of the application became black after reparenting the application to another display that has higher resolution. Bug: 119594151 Test: Launch app to default display that was on secondary display Change-Id: Ia9f6ac420b315732ae05f29feee600953a6f3055 --- services/core/java/com/android/server/wm/SurfaceAnimator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/SurfaceAnimator.java b/services/core/java/com/android/server/wm/SurfaceAnimator.java index 66063c4059436..31c0c7f588c3a 100644 --- a/services/core/java/com/android/server/wm/SurfaceAnimator.java +++ b/services/core/java/com/android/server/wm/SurfaceAnimator.java @@ -305,7 +305,7 @@ class SurfaceAnimator { .setName(surface + " - animation-leash") .setSize(width, height); final SurfaceControl leash = builder.build(); - t.setWindowCrop(surface, width, height); + t.setWindowCrop(leash, width, height); if (!hidden) { t.show(leash); }