Loading res/layout/grid_preview_card.xml +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ android:layout_height="match_parent" android:importantForAccessibility="noHideDescendants" /> <View <ImageView android:id="@+id/grid_fadein_scrim" android:layout_width="match_parent" android:layout_height="match_parent" Loading src/com/android/customization/picker/WallpaperPreviewer.java +11 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.app.Activity; import android.app.WallpaperColors; import android.content.Intent; import android.graphics.Rect; import android.graphics.RenderEffect; import android.graphics.Shader.TileMode; import android.service.wallpaper.WallpaperService; import android.view.Surface; import android.view.SurfaceView; Loading Loading @@ -54,7 +56,7 @@ public class WallpaperPreviewer implements LifecycleObserver { private final Activity mActivity; private final ImageView mHomePreview; private final SurfaceView mWallpaperSurface; @Nullable private final View mFadeInScrim; @Nullable private final ImageView mFadeInScrim; private WallpaperSurfaceCallback mWallpaperSurfaceCallback; private WallpaperInfo mWallpaper; Loading @@ -73,7 +75,7 @@ public class WallpaperPreviewer implements LifecycleObserver { } public WallpaperPreviewer(Lifecycle lifecycle, Activity activity, ImageView homePreview, SurfaceView wallpaperSurface, @Nullable View fadeInScrim) { SurfaceView wallpaperSurface, @Nullable ImageView fadeInScrim) { lifecycle.addObserver(this); mActivity = activity; Loading Loading @@ -170,10 +172,16 @@ public class WallpaperPreviewer implements LifecycleObserver { mActivity, android.R.attr.colorSecondary), /* offsetToStart= */ true); if (mWallpaper instanceof LiveWallpaperInfo) { ImageView preview = homeImageWallpaper; if (VideoWallpaperUtils.needsFadeIn(mWallpaper) && mFadeInScrim != null) { preview = mFadeInScrim; preview.setRenderEffect( RenderEffect.createBlurEffect(150f, 150f, TileMode.CLAMP)); } mWallpaper.getThumbAsset(mActivity.getApplicationContext()) .loadPreviewImage( mActivity, homeImageWallpaper, preview, ResourceUtils.getColorAttr( mActivity, android.R.attr.colorSecondary), /* offsetToStart= */ true); Loading Loading
res/layout/grid_preview_card.xml +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ android:layout_height="match_parent" android:importantForAccessibility="noHideDescendants" /> <View <ImageView android:id="@+id/grid_fadein_scrim" android:layout_width="match_parent" android:layout_height="match_parent" Loading
src/com/android/customization/picker/WallpaperPreviewer.java +11 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.app.Activity; import android.app.WallpaperColors; import android.content.Intent; import android.graphics.Rect; import android.graphics.RenderEffect; import android.graphics.Shader.TileMode; import android.service.wallpaper.WallpaperService; import android.view.Surface; import android.view.SurfaceView; Loading Loading @@ -54,7 +56,7 @@ public class WallpaperPreviewer implements LifecycleObserver { private final Activity mActivity; private final ImageView mHomePreview; private final SurfaceView mWallpaperSurface; @Nullable private final View mFadeInScrim; @Nullable private final ImageView mFadeInScrim; private WallpaperSurfaceCallback mWallpaperSurfaceCallback; private WallpaperInfo mWallpaper; Loading @@ -73,7 +75,7 @@ public class WallpaperPreviewer implements LifecycleObserver { } public WallpaperPreviewer(Lifecycle lifecycle, Activity activity, ImageView homePreview, SurfaceView wallpaperSurface, @Nullable View fadeInScrim) { SurfaceView wallpaperSurface, @Nullable ImageView fadeInScrim) { lifecycle.addObserver(this); mActivity = activity; Loading Loading @@ -170,10 +172,16 @@ public class WallpaperPreviewer implements LifecycleObserver { mActivity, android.R.attr.colorSecondary), /* offsetToStart= */ true); if (mWallpaper instanceof LiveWallpaperInfo) { ImageView preview = homeImageWallpaper; if (VideoWallpaperUtils.needsFadeIn(mWallpaper) && mFadeInScrim != null) { preview = mFadeInScrim; preview.setRenderEffect( RenderEffect.createBlurEffect(150f, 150f, TileMode.CLAMP)); } mWallpaper.getThumbAsset(mActivity.getApplicationContext()) .loadPreviewImage( mActivity, homeImageWallpaper, preview, ResourceUtils.getColorAttr( mActivity, android.R.attr.colorSecondary), /* offsetToStart= */ true); Loading