Passed an extra flag denoting whether assetId is present or not

This CL aims at making changes for passing an extra flag which denotes
whether assetId is present or not while previewing a wallpaper. This is
needed in order to determine accurately the right destination we would
want to allow when a user edits a wallpaper.

Bug: b/279574752
Test: Tested by editing the currently applied wallpaper and checking the
available options for setting the edited wallpaper.

Change-Id: I89ba8e66b741a57c79721e6d21e3446c7da9d21c
diff --git a/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java b/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java
index d3935e8..4f0cd6c 100644
--- a/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java
+++ b/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java
@@ -137,13 +137,13 @@
 
     @Override
     public void showPreview(Activity srcActivity, InlinePreviewIntentFactory factory,
-            int requestCode) {
+            int requestCode, boolean isAssetIdPresent) {
         try {
-            srcActivity.startActivityForResult(factory.newIntent(srcActivity, this), requestCode);
+            srcActivity.startActivityForResult(factory.newIntent(srcActivity, this,
+                    isAssetIdPresent), requestCode);
         } catch (ActivityNotFoundException |SecurityException e) {
             Log.e(TAG, "App isn't installed or ThemePicker doesn't have permission to launch", e);
         }
-
     }
 
     @Override
diff --git a/src/com/android/customization/module/ThemePickerInjector.kt b/src/com/android/customization/module/ThemePickerInjector.kt
index 653c403..9dbd485 100644
--- a/src/com/android/customization/module/ThemePickerInjector.kt
+++ b/src/com/android/customization/module/ThemePickerInjector.kt
@@ -179,7 +179,8 @@
         mode: Int,
         viewAsHome: Boolean,
         viewFullScreen: Boolean,
-        testingModeEnabled: Boolean
+        testingModeEnabled: Boolean,
+        isAssetIdPresent: Boolean
     ): Fragment {
         return if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment()
         else