Store recently applied wallpapers

Bug: 188248576
Test: manual
Change-Id: I19984c8919cd8b0b24856cd43284f0029d3e2950
diff --git a/src/com/android/wallpaper/module/WallpaperPreferences.java b/src/com/android/wallpaper/module/WallpaperPreferences.java
index 2a0fc39..e1dd60d 100755
--- a/src/com/android/wallpaper/module/WallpaperPreferences.java
+++ b/src/com/android/wallpaper/module/WallpaperPreferences.java
@@ -16,11 +16,16 @@
 package com.android.wallpaper.module;
 
 import android.annotation.TargetApi;
+import android.app.WallpaperColors;
+import android.graphics.Bitmap;
 import android.os.Build;
 
 import androidx.annotation.IntDef;
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
+import com.android.wallpaper.model.LiveWallpaperInfo;
+import com.android.wallpaper.model.WallpaperInfo;
 import com.android.wallpaper.module.WallpaperPersister.Destination;
 
 import java.util.List;
@@ -512,4 +517,27 @@
             DAILY_WALLPAPER_UPDATE_PENDING})
     @interface PendingDailyWallpaperUpdateStatus {
     }
+
+    /**
+     * Stores the given live wallpaper in the recent wallpapers list
+     * @param wallpaperId unique identifier for this wallpaper
+     * @param wallpaper {@link LiveWallpaperInfo} for the applied wallpaper
+     * @param colors WallpaperColors to be used as placeholder for quickswitching
+     */
+    default void storeLatestHomeWallpaper(String wallpaperId,
+            @NonNull LiveWallpaperInfo wallpaper, WallpaperColors colors) {
+        // Do nothing in the default case.
+    }
+
+    /**
+     * Stores the given static wallpaper data in the recent wallpapers list.
+     * @param wallpaperId unique identifier for this wallpaper
+     * @param wallpaper {@link WallpaperInfo} for the applied wallpaper
+     * @param croppedWallpaperBitmap wallpaper bitmap exactly as applied to WallaperManager
+     * @param colors WallpaperColors to be used as placeholder for quickswitching
+     */
+    default void storeLatestHomeWallpaper(String wallpaperId, @NonNull WallpaperInfo wallpaper,
+            @NonNull Bitmap croppedWallpaperBitmap, WallpaperColors colors) {
+        // Do nothing in the default case.
+    }
 }