Refresh wallpaper section and update category fragment
Refresh wallpaper section in CustomizationPickerActivity's onResume()
and update its fragment for the preview changing.
Bug: 131811513
Test: Manual
Change-Id: Ide89f944d908fd034b1bbf05d1322961f429881e
diff --git a/src/com/android/customization/picker/CustomizationPickerActivity.java b/src/com/android/customization/picker/CustomizationPickerActivity.java
index 8759dab..281ff78 100644
--- a/src/com/android/customization/picker/CustomizationPickerActivity.java
+++ b/src/com/android/customization/picker/CustomizationPickerActivity.java
@@ -141,6 +141,18 @@
mUserEventLogger.logResumed();
// refresh the sections as the preview may have changed
initSections();
+ if (mBottomNav == null) {
+ return;
+ }
+ CustomizationSection section = mSections.get(mBottomNav.getSelectedItemId());
+ if (section == null) {
+ return;
+ }
+ // Keep CategoryFragment's design to load category within its fragment
+ if (section instanceof WallpaperSection) {
+ switchFragment(section);
+ section.onVisible();
+ }
}
@Override