diff options
author | Michael Jurka <mikejurka@google.com> | 2011-11-13 13:50:38 -0800 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-11-14 23:49:10 -0800 |
commit | bfd24acd318ef958bb7997c9cbf95c5fb15b10ac (patch) | |
tree | 41e93afbac6ee62c19f7447d122298b46f92cb9a /services | |
parent | 2af9f21c664d4579b5f51283a320a7d1fba13a75 (diff) | |
download | frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.zip frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.tar.gz frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.tar.bz2 |
Updating recent apps visuals on tablet
- getting rid of blue glow (5529032)
- moving app icon position
- show message if there are no recent apps (5533332)
- fixing rare IllegalStateException on orientation change (5584344)
Change-Id: I2210e584957869c8f02339e6841daf39364a9dad
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 50321b3..ebb13d5 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -5090,10 +5090,22 @@ public class WindowManagerService extends IWindowManager.Stub // Constrain thumbnail to smaller of screen width or height. Assumes aspect // of thumbnail is the same as the screen (in landscape) or square. + float targetWidthScale = width / (float) fw; + float targetHeightScale = height / (float) fh; if (dw <= dh) { - scale = width / (float) fw; // portrait + scale = targetWidthScale; + // If aspect of thumbnail is the same as the screen (in landscape), + // select the slightly larger value so we fill the entire bitmap + if (targetHeightScale > scale && (int) (targetHeightScale * fw) == width) { + scale = targetHeightScale; + } } else { - scale = height / (float) fh; // landscape + scale = targetHeightScale; + // If aspect of thumbnail is the same as the screen (in landscape), + // select the slightly larger value so we fill the entire bitmap + if (targetWidthScale > scale && (int) (targetWidthScale * fh) == height) { + scale = targetWidthScale; + } } // The screen shot will contain the entire screen. |