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

Commit 75690f47 authored by Mihai Preda's avatar Mihai Preda
Browse files

Correctly truncate file on wallpaper update.

Fixes bug where only the initial part of the file is updated on wallpaper change, but the size of the file never decreases -- resulting in a file that's too large and with garbage at the end.

Change-Id: Ib91b2aa2d08f8a6136ab2413bd5f77fcb887a5a7
parent d89ad534
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
        if (name == null) name = "";
        try {
            ParcelFileDescriptor fd = ParcelFileDescriptor.open(WALLPAPER_FILE,
                    MODE_CREATE|MODE_READ_WRITE);
                    MODE_CREATE|MODE_READ_WRITE|MODE_TRUNCATE);
            mName = name;
            return fd;
        } catch (FileNotFoundException e) {