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/picker/TopLevelPickerActivity.java b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
index e0b2dec..fa46373 100755
--- a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
+++ b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
@@ -581,7 +581,7 @@
if (exploreIntent != null && !isDestroyed()) {
// Set the icon for the button
Drawable exploreButtonDrawable = getResources().getDrawable(
- homeWallpaper.getActionIconRes());
+ homeWallpaper.getActionIconRes(appContext));
// This Drawable's state is shared across the app, so make a copy of it
// before applying a color tint as not to affect other clients elsewhere
@@ -595,7 +595,7 @@
ButtonDrawableSetterCompat.setDrawableToButtonStart(
mCurrentWallpaperExploreButton, exploreButtonDrawable);
mCurrentWallpaperExploreButton.setText(getString(
- homeWallpaper.getActionLabelRes()));
+ homeWallpaper.getActionLabelRes(appContext)));
mCurrentWallpaperExploreButton.setVisibility(View.VISIBLE);
mCurrentWallpaperExploreButton.setOnClickListener(new OnClickListener() {
@Override