Update lockscreen preview
- Rename LockScreenPreviewer2 to LockScreenPreviewer.
- Update the lockscreen layout.
- Hide date view (smartspace) for full screen preview.
- Release LockScreenPreviewer in proper
Video: https://drive.google.com/file/d/1mHfy67r_MsVmIlzYUvELAS9Jtw-76Xau/view?usp=sharing
Bug: 189923470
Test: Manually
Change-Id: I4475865210741639de688654d43c58c877a35b0f
diff --git a/src/com/android/wallpaper/picker/ImagePreviewFragment.java b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
index b0a5a4f..6fbfd43 100755
--- a/src/com/android/wallpaper/picker/ImagePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
@@ -69,7 +69,7 @@
import com.android.wallpaper.util.WallpaperCropUtils;
import com.android.wallpaper.widget.BottomActionBar;
import com.android.wallpaper.widget.BottomActionBar.AccessibilityCallback;
-import com.android.wallpaper.widget.LockScreenPreviewer2;
+import com.android.wallpaper.widget.LockScreenPreviewer;
import com.android.wallpaper.widget.WallpaperInfoView;
import com.bumptech.glide.Glide;
@@ -106,7 +106,7 @@
protected SurfaceView mWorkspaceSurface;
protected WorkspaceSurfaceHolderCallback mWorkspaceSurfaceCallback;
protected ViewGroup mLockPreviewContainer;
- protected LockScreenPreviewer2 mLockScreenPreviewer;
+ protected LockScreenPreviewer mLockScreenPreviewer;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -152,9 +152,11 @@
mWorkspaceSurfaceCallback = createWorkspaceSurfaceCallback(mWorkspaceSurface);
mWallpaperSurface = mContainer.findViewById(R.id.wallpaper_surface);
mLockPreviewContainer = mContainer.findViewById(R.id.lock_screen_preview_container);
- mLockScreenPreviewer = new LockScreenPreviewer2(getLifecycle(), getContext(),
+ mLockScreenPreviewer = new LockScreenPreviewer(getLifecycle(), getContext(),
mLockPreviewContainer);
-
+ mLockScreenPreviewer.setDateViewVisibility(!mFullScreenAnimation.isFullScreen());
+ mFullScreenAnimation.setFullScreenStatusListener(
+ isFullScreen -> mLockScreenPreviewer.setDateViewVisibility(!isFullScreen));
setUpTabs(view.findViewById(R.id.pill_tabs));
view.measure(makeMeasureSpec(mScreenSize.x, EXACTLY),
@@ -236,6 +238,10 @@
mFullResImageView.recycle();
}
+ if (mLockScreenPreviewer != null) {
+ mLockScreenPreviewer.release();
+ }
+
mWallpaperSurfaceCallback.cleanUp();
mWorkspaceSurfaceCallback.cleanUp();
}