OSDN Git Service

Update circular mask after display is ready.
authorFilip Gruszczynski <gruszczy@google.com>
Tue, 15 Sep 2015 20:17:44 +0000 (13:17 -0700)
committerFilip Gruszczynski <gruszczy@google.com>
Tue, 15 Sep 2015 20:17:44 +0000 (13:17 -0700)
This fixes the situation where the circular mask is not applied because
the configuration is not reporting round screen. Configuration is
computed based on the display, so we can only depend on it having the
correct information after the display became ready.

Bug: 23689649
Bug: 23325855
Change-Id: I1e1fa307836f4053cfc4978da0239cb42c5af2c3

services/core/java/com/android/server/wm/WindowManagerService.java

index a0499b7..f47b4d8 100644 (file)
@@ -996,7 +996,6 @@ public class WindowManagerService extends IWindowManager.Stub
             SurfaceControl.closeTransaction();
         }
 
-        updateCircularDisplayMaskIfNeeded();
         showEmulatorDisplayOverlayIfNeeded();
     }
 
@@ -5948,7 +5947,7 @@ public class WindowManagerService extends IWindowManager.Stub
         }
     }
 
-    public void updateCircularDisplayMaskIfNeeded() {
+    private void updateCircularDisplayMaskIfNeeded() {
         // we're fullscreen and not hosted in an ActivityView
         if (mContext.getResources().getConfiguration().isScreenRound()
                 && mContext.getResources().getBoolean(
@@ -7664,6 +7663,8 @@ public class WindowManagerService extends IWindowManager.Stub
             mActivityManager.updateConfiguration(null);
         } catch (RemoteException e) {
         }
+
+        updateCircularDisplayMaskIfNeeded();
     }
 
     private void displayReady(int displayId) {