Refresh wallpaper categories in TopLevelPicker's onCreate() am: 5f68997353
am: 9dc8f15d30
Change-Id: I99d3d79d2e89343ff46f5240d9240b97869e6660
diff --git a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
index 7e0da5e..42e9081 100755
--- a/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
+++ b/src/com/android/wallpaper/picker/TopLevelPickerActivity.java
@@ -176,7 +176,7 @@
}
if (mDelegate.getFormFactor() == FormFactorChecker.FORM_FACTOR_MOBILE) {
- initializeMobile();
+ initializeMobile(true /* shouldForceRefresh */);
} else { // DESKTOP
initializeDesktop(savedInstanceState);
}
@@ -235,7 +235,7 @@
return mDelegate.isReadExternalStoragePermissionGranted();
}
- private void initializeMobile() {
+ private void initializeMobile(boolean shouldForceRefresh) {
setContentView(R.layout.activity_single_fragment);
// Set toolbar as the action bar.
@@ -245,7 +245,6 @@
FragmentManager fm = getSupportFragmentManager();
Fragment fragment = fm.findFragmentById(R.id.fragment_container);
- boolean forceCategoryRefresh = false;
if (fragment == null) {
// App launch specific logic: log the "app launched" event and set up daily logging.
mUserEventLogger.logAppLaunched();
@@ -256,11 +255,9 @@
fm.beginTransaction()
.add(R.id.fragment_container, newFragment)
.commit();
-
- forceCategoryRefresh = true;
}
- mDelegate.initialize(forceCategoryRefresh);
+ mDelegate.initialize(shouldForceRefresh);
}
private void initializeDesktop(Bundle savedInstanceState) {