diff options
author | Bhavuk Jain <bhavukj@google.com> | 2023-08-15 22:26:16 +0000 |
---|---|---|
committer | Bhavuk Jain <bhavukj@google.com> | 2023-08-15 22:28:42 +0000 |
commit | 37c6c9d61ed01b91e3f9547eff081c3e7156c37f (patch) | |
tree | e2d40fc24f921a30d56adef10fec899387ebcd1a | |
parent | 51e37922ff5c06b4eaed1266114162b3fd50c839 (diff) | |
download | ThemePicker-37c6c9d61ed01b91e3f9547eff081c3e7156c37f.tar.gz |
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
-rw-r--r-- | src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java | 6 | ||||
-rw-r--r-- | src/com/android/customization/module/ThemePickerInjector.kt | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java b/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java index d3935e80..4f0cd6c7 100644 --- a/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java +++ b/src/com/android/customization/model/theme/ThemeBundledWallpaperInfo.java @@ -137,13 +137,13 @@ public class ThemeBundledWallpaperInfo extends WallpaperInfo { @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 653c403c..9dbd485a 100644 --- a/src/com/android/customization/module/ThemePickerInjector.kt +++ b/src/com/android/customization/module/ThemePickerInjector.kt @@ -179,7 +179,8 @@ internal constructor( mode: Int, viewAsHome: Boolean, viewFullScreen: Boolean, - testingModeEnabled: Boolean + testingModeEnabled: Boolean, + isAssetIdPresent: Boolean ): Fragment { return if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment() else |