OSDN Git Service

DO NOT MERGE Validate wallpaper dimension while generating crop
authorAhan Wu <ahanwu@google.com>
Thu, 26 Sep 2019 11:00:26 +0000 (19:00 +0800)
committerWu Ahan <ahanwu@google.com>
Wed, 2 Oct 2019 03:13:50 +0000 (03:13 +0000)
commit160c28c36d728e932ceac5babc512cf2aa59c857
tree42e30c0188f65f2645cc3958eede40a9304f1351
parentf8a2d069b41c0f075073ee828a694e55490a3493
DO NOT MERGE Validate wallpaper dimension while generating crop

If dimensions of cropped wallpaper image exceed max texture size that
GPU can support, it will cause ImageWallpaper keep crashing
because hwui crashes by invalid operation (0x502).

Bug: 120847476.
Test: Write a custom app to set a 8000x800 bitmap as wallpaper.
Test: The cropped file will be 29600x2960 and make sysui keep crashing.
Test: After applyed this cl, wallpaper will use fallback.
Test: Sysui will not keep crashing any more.
Change-Id: Ifaf2085a0bc94448e49fa2f30066f47310586236
services/core/java/com/android/server/wallpaper/GLHelper.java [new file with mode: 0644]
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java