Add Context argument to getAction methods
Add a Context argument to methods for getting title and
icon for the action link, to support cases where we're
obtaining these from resources.
Bug: 77695473
Change-Id: I3e8b1d47afa46ab98d82f29ee0b19148362e249a
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
index 5d371a3..1c9c0ba 100755
--- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
+++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -1001,8 +1001,10 @@
mWallpaper.getAttributions(mAppContext));
mWallpaperPreferences.setHomeWallpaperBaseImageUrl(mWallpaper.getBaseImageUrl());
mWallpaperPreferences.setHomeWallpaperActionUrl(mWallpaper.getActionUrl(mAppContext));
- mWallpaperPreferences.setHomeWallpaperActionLabelRes(mWallpaper.getActionLabelRes());
- mWallpaperPreferences.setHomeWallpaperActionIconRes(mWallpaper.getActionIconRes());
+ mWallpaperPreferences.setHomeWallpaperActionLabelRes(
+ mWallpaper.getActionLabelRes(mAppContext));
+ mWallpaperPreferences.setHomeWallpaperActionIconRes(
+ mWallpaper.getActionIconRes(mAppContext));
mWallpaperPreferences.setHomeWallpaperCollectionId(
mWallpaper.getCollectionId(mAppContext));
mWallpaperPreferences.setHomeWallpaperRemoteId(mWallpaper.getWallpaperId());
@@ -1013,8 +1015,10 @@
mWallpaperPreferences.setLockWallpaperAttributions(
mWallpaper.getAttributions(mAppContext));
mWallpaperPreferences.setLockWallpaperActionUrl(mWallpaper.getActionUrl(mAppContext));
- mWallpaperPreferences.setHomeWallpaperActionLabelRes(mWallpaper.getActionLabelRes());
- mWallpaperPreferences.setHomeWallpaperActionIconRes(mWallpaper.getActionIconRes());
+ mWallpaperPreferences.setHomeWallpaperActionLabelRes(
+ mWallpaper.getActionLabelRes(mAppContext));
+ mWallpaperPreferences.setHomeWallpaperActionIconRes(
+ mWallpaper.getActionIconRes(mAppContext));
mWallpaperPreferences.setLockWallpaperCollectionId(
mWallpaper.getCollectionId(mAppContext));