Hook WallpaperPicker related APIs to ThemePicker
Make the Wallpapers section function as the regular
WallpaperPicker
Bug: 120559978
Change-Id: I7a3aa736abf220143f8d2ce7852fade5f7abd328
diff --git a/src/com/android/customization/picker/CustomizationPickerActivity.java b/src/com/android/customization/picker/CustomizationPickerActivity.java
index e2dee20..c27cb90 100644
--- a/src/com/android/customization/picker/CustomizationPickerActivity.java
+++ b/src/com/android/customization/picker/CustomizationPickerActivity.java
@@ -38,7 +38,8 @@
import com.android.wallpaper.module.UserEventLogger;
import com.android.wallpaper.picker.CategoryFragment;
import com.android.wallpaper.picker.CategoryFragment.CategoryFragmentHost;
-import com.android.wallpaper.picker.MyPhotosLauncher.PermissionChangedListener;
+import com.android.wallpaper.picker.MyPhotosStarter;
+import com.android.wallpaper.picker.MyPhotosStarter.PermissionChangedListener;
import com.android.wallpaper.picker.TopLevelPickerActivity;
import com.android.wallpaper.picker.WallpaperPickerDelegate;
import com.android.wallpaper.picker.WallpapersUiContainer;
@@ -142,17 +143,17 @@
@Override
public void requestExternalStoragePermission(PermissionChangedListener listener) {
-
+ mDelegate.requestExternalStoragePermission(listener);
}
@Override
public boolean isReadExternalStoragePermissionGranted() {
- return false;
+ return mDelegate.isReadExternalStoragePermissionGranted();
}
@Override
public void showViewOnlyPreview(WallpaperInfo wallpaperInfo) {
-
+ mDelegate.showViewOnlyPreview(wallpaperInfo);
}
/**
@@ -179,6 +180,11 @@
}
+ @Override
+ public MyPhotosStarter getMyPhotosStarter() {
+ return mDelegate;
+ }
+
/**
* Represents a section of the Picker (eg "ThemeBundle", "Clock", etc).
* There should be a concrete subclass per available section, providing the corresponding