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

Commit f7d40ce8 authored by Sashidhar Ganiga's avatar Sashidhar Ganiga Committed by Gerrit - the friendly Code Review server
Browse files

platform/framework/base: Fix Half Blank screen issue in Wallpaper

Issue: Start Any Full Screen Activity/ VideoView Activity in
       portrait mode, change to landscape mode and then perform
       suspend and resume. Only Half of the screen has display,
       the other half is blank screen

Fix: Added a check to update surface size on both rotation change
     and surface size change.

Change-Id: Iba77dfdb778ea3c60bbb1df33188fd4f792ab77c
CRs-Fixed: 712741
parent f4238e7e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ public class ImageWallpaper extends WallpaperService {
        boolean mVisible = true;
        boolean mRedrawNeeded;
        boolean mOffsetsChanged;
        boolean mSurfaceChanged;
        int mLastXTranslation;
        int mLastYTranslation;

@@ -300,7 +301,7 @@ public class ImageWallpaper extends WallpaperService {
            }

            super.onSurfaceChanged(holder, format, width, height);

            mSurfaceChanged = true;
            drawFrame();
        }

@@ -342,9 +343,10 @@ public class ImageWallpaper extends WallpaperService {
            // Sometimes a wallpaper is not large enough to cover the screen in one dimension.
            // Call updateSurfaceSize -- it will only actually do the update if the dimensions
            // should change
            if (newRotation != mLastRotation) {
            if (newRotation != mLastRotation || mSurfaceChanged ) {
                // Update surface size (if necessary)
                updateSurfaceSize(getSurfaceHolder());
                mSurfaceChanged = false;
            }
            SurfaceHolder sh = getSurfaceHolder();
            final Rect frame = sh.getSurfaceFrame();