Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb925e7a authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix 4689527: Fix rendering issue with thumbnails on phones"

parents 1574bb7e 28637bac
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -4886,8 +4886,13 @@ public class WindowManagerService extends IWindowManager.Stub
            int fw = frame.width();
            int fh = frame.height();

            // First try reducing to fit in x dimension.
            scale = width/(float)fw;
            // Constrain thumbnail to smaller of screen width or height. Assumes aspect
            // of thumbnail is the same as the screen (in landscape) or square.
            if (dw <= dh) {
                scale = width / (float) fw; // portrait
            } else {
                scale = height / (float) fh; // landscape
            }

            // The screen shot will contain the entire screen.
            dw = (int)(dw*scale);