Fix set wallpaper button in full screen mode gets the wrong wallpaper

Bug: 245517044
Test: Manual
Change-Id: I834e327d51d5a9aea597ea2e9eb3d829914d62d7
diff --git a/src/com/android/wallpaper/picker/PreviewFragment.java b/src/com/android/wallpaper/picker/PreviewFragment.java
index 008b553..0b26ca7 100755
--- a/src/com/android/wallpaper/picker/PreviewFragment.java
+++ b/src/com/android/wallpaper/picker/PreviewFragment.java
@@ -298,7 +298,7 @@
                     }
             );
             container.findViewById(R.id.set_as_wallpaper_button).setOnClickListener(
-                    unused -> onSetWallpaperClicked(null, mWallpaper));
+                    unused -> onSetWallpaperClicked(null, getCurrentWallpaperInfo()));
         } else {
             container.findViewById(R.id.hide_ui_preview_button).setVisibility(View.GONE);
             container.findViewById(R.id.set_as_wallpaper_button).setVisibility(View.GONE);
@@ -323,6 +323,10 @@
         mFullScreenAnimation.ensureBottomActionBarIsCorrectlyLocated();
     }
 
+    protected WallpaperInfo getCurrentWallpaperInfo() {
+        return mWallpaper;
+    }
+
     protected List<String> getAttributions(Context context) {
         return mWallpaper.getAttributions(context);
     }