Report bounds instead of size in WindowMetrics am: 9e174f5e93 am: 53e907be5b am: ee1588d7c3 am: 9d7a221078

Change-Id: I94b8808825cffdc79af0a253b43542f0ec6d801a
diff --git a/bridge/src/com/android/layoutlib/bridge/android/view/WindowManagerImpl.java b/bridge/src/com/android/layoutlib/bridge/android/view/WindowManagerImpl.java
index c79e45a..f7f1446 100644
--- a/bridge/src/com/android/layoutlib/bridge/android/view/WindowManagerImpl.java
+++ b/bridge/src/com/android/layoutlib/bridge/android/view/WindowManagerImpl.java
@@ -112,7 +112,7 @@
     public WindowMetrics getCurrentWindowMetrics() {
         final Rect bound = getCurrentBounds(mContext);
 
-        return new WindowMetrics(toSize(bound), computeWindowInsets());
+        return new WindowMetrics(bound, computeWindowInsets());
     }
 
     private static Rect getCurrentBounds(Context context) {
@@ -123,11 +123,7 @@
 
     @Override
     public WindowMetrics getMaximumWindowMetrics() {
-        return new WindowMetrics(toSize(getMaximumBounds()), computeWindowInsets());
-    }
-
-    private Size toSize(Rect frame) {
-        return new Size(frame.width(), frame.height());
+        return new WindowMetrics(getMaximumBounds(), computeWindowInsets());
     }
 
     private Rect getMaximumBounds() {