Add ability to pass WallpaperColors as argument to workspace preview
Bug: 185198554
Test: manual
Change-Id: I7b37999a9d71ef53a72507d0fdfaeabcc5ccfef4
diff --git a/src/com/android/wallpaper/picker/ImagePreviewFragment.java b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
index 7e99797..2ecd05f 100755
--- a/src/com/android/wallpaper/picker/ImagePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
@@ -94,10 +94,10 @@
private TouchForwardingLayout mTouchForwardingLayout;
private ConstraintLayout mContainer;
private SurfaceView mWorkspaceSurface;
- private WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
private SurfaceView mWallpaperSurface;
private WallpaperInfoView mWallpaperInfoView;
+ protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
protected ViewGroup mLockPreviewContainer;
protected LockScreenPreviewer2 mLockScreenPreviewer;
@@ -141,8 +141,7 @@
set.applyTo(mContainer);
mWorkspaceSurface = mContainer.findViewById(R.id.workspace_surface);
- mWorkspaceSurfaceCallback = new WorkspaceSurfaceHolderCallback(mWorkspaceSurface,
- getContext());
+ mWorkspaceSurfaceCallback = createWorkspaceSurfaceCallback(mWorkspaceSurface);
mWallpaperSurface = mContainer.findViewById(R.id.wallpaper_surface);
mLockPreviewContainer = mContainer.findViewById(R.id.lock_screen_preview_container);
mLockScreenPreviewer = new LockScreenPreviewer2(getLifecycle(), getContext(),