Move show wallpaper metadata logic into WallpaperInfoView
Test: Manually
Bug: 155157385
Change-Id: Ia349359f98a49db1e73148151dae72a1d5acf282
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
index 0f042ab..11e0624 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -947,11 +947,9 @@
mSelectedWallpaperInfo = newSelectedWallpaperInfo;
updateBottomActions(mSelectedWallpaperInfo != null);
updateThumbnail(mSelectedWallpaperInfo);
- // Populate wallpaper info to bottom sheet page.
+ // Populate wallpaper info into view.
if (mSelectedWallpaperInfo != null && mWallpaperInfoView != null) {
- mWallpaperInfoView.populateWallpaperInfo(
- mSelectedWallpaperInfo.getAttributions(getContext()),
- shouldShowMetadataInPreview(mSelectedWallpaperInfo));
+ mWallpaperInfoView.populateWallpaperInfo(mSelectedWallpaperInfo);
}
if (mWallpaperSelectedListener != null) {
@@ -992,11 +990,6 @@
}
}
- private static boolean shouldShowMetadataInPreview(WallpaperInfo wallpaperInfo) {
- android.app.WallpaperInfo wallpaperComponent = wallpaperInfo.getWallpaperComponent();
- return wallpaperComponent == null || wallpaperComponent.getShowMetadataInPreview();
- }
-
private void refreshAppliedWallpaper() {
// Clear the check mark and blue border(if it shows) of the old applied wallpaper.
showCheckMarkAndBorderForAppliedWallpaper(false);