Add new apply flow for custom theme page
Test: Manually
Bug: 151285476
Change-Id: Ie2b23d79a7421fe1be819fc1fa202efbef2a0f3f
diff --git a/src/com/android/customization/picker/theme/CustomThemeActivity.java b/src/com/android/customization/picker/theme/CustomThemeActivity.java
index 6173b3d..df968e5 100644
--- a/src/com/android/customization/picker/theme/CustomThemeActivity.java
+++ b/src/com/android/customization/picker/theme/CustomThemeActivity.java
@@ -220,7 +220,8 @@
mThemeManager.apply(themeToApply, new Callback() {
@Override
public void onSuccess() {
- Toast.makeText(CustomThemeActivity.this, R.string.applied_theme_msg,
+ overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
+ Toast.makeText(getApplicationContext(), R.string.applied_theme_msg,
Toast.LENGTH_LONG).show();
setResult(RESULT_THEME_APPLIED);
finish();
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index 180b5cb..132ce18 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -225,7 +225,7 @@
mSelectedTheme = null;
reloadOptions();
} else if (resultCode == CustomThemeActivity.RESULT_THEME_APPLIED) {
- getActivity().finish();
+ reloadOptions();
} else {
if (mSelectedTheme != null) {
mOptionsController.setSelectedOption(mSelectedTheme);