Refresh wallpaper section and update category fragment
am: 6fb5a5ebb3
Change-Id: I3299b757de73897b7697dffc398b34224a1d83dd
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