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

Skip to content
Commit b5564892 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Update read wallpaper methods (U and above)

The following methods in WallpaperManager:
  - getDrawable()
  - getDrawable(int which)
  - peekDrawable()
  - peekDrawable(int which)
  - getFastDrawable()
  - getFastDrawable(int which)
  - peekFastDrawable()
  - peekFastDrawable(int which)
  - getWallpaperFile(int which)

Have been changed in T to return the default system wallpaper data unless the caller has the internal permission READ_WALLPAPER_INTERNAL (or MANAGE_EXTERNAL_STORAGE).

The READ_WALLPAPER_INTERNAL permission has been added in the SystemUI and shell AndroidManifest.

This CL also stops returning the cached wallpaper if an app doesn't hold
the READ_WALLPAPER_INTERNAL permission.

Test: treehugger
Test: atest CtsScopedStorageDeviceOnlyTest
Test: atest ScopedStorageHostTest
Test: atest CtsAppOpsTestCases
Test: atest CtsWallpaperTestCases
Test: atest NoWallpaperPermissionsTest
Test: atest LauncherIronwoodIntegrationTests (see
HomescreenCustomizationTests#testChangeWallpaper)
Bug: 261906287
Bug: 239784307

Change-Id: I8f90fbe78668e4e1d09188196180ca39c6b760b1
parent b29ba60e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment