summaryrefslogtreecommitdiff
path: root/src/com/android/customization/model/theme
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-01 19:14:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-01 19:14:15 +0000
commite83b288c56fc668de1ef63d9d78bb371a5fd8356 (patch)
tree94f7486dc2ed30ed928dc08c003efe1c1071379b /src/com/android/customization/model/theme
parentea7427c63214a34d1687ff5526ef7ffc88c5eccf (diff)
parenta78c7a89904ec3608351f76e2700b99d0e95bbfe (diff)
downloadThemePicker-e83b288c56fc668de1ef63d9d78bb371a5fd8356.tar.gz
Merge "Add onSaveInstanceState support for GridPicker" into ub-launcher3-master
Diffstat (limited to 'src/com/android/customization/model/theme')
-rw-r--r--src/com/android/customization/model/theme/custom/CustomThemeManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/customization/model/theme/custom/CustomThemeManager.java b/src/com/android/customization/model/theme/custom/CustomThemeManager.java
index f4466e0a..42d73e60 100644
--- a/src/com/android/customization/model/theme/custom/CustomThemeManager.java
+++ b/src/com/android/customization/model/theme/custom/CustomThemeManager.java
@@ -35,7 +35,7 @@ import java.util.Map;
public class CustomThemeManager implements CustomizationManager<ThemeComponentOption> {
private static final String TAG = "CustomThemeManager";
- private static final String EXTRA_CUSTOM_THEME_OPTION = "custom_theme_option";
+ private static final String KEY_STATE_CURRENT_SELECTION = "CustomThemeManager.currentSelection";
private final CustomTheme mOriginalTheme;
private CustomTheme.Builder mBuilder;
@@ -85,14 +85,14 @@ public class CustomThemeManager implements CustomizationManager<ThemeComponentOp
public void saveCustomTheme(Context context, Bundle savedInstanceState) {
CustomTheme customTheme =
buildPartialCustomTheme(context, /* id= */ null, /* title= */ null);
- savedInstanceState.putString(EXTRA_CUSTOM_THEME_OPTION,
+ savedInstanceState.putString(KEY_STATE_CURRENT_SELECTION,
customTheme.getSerializedPackages());
}
/** Reads the saved custom theme after system config changed. */
public void readCustomTheme(ThemeBundleProvider themeBundleProvider,
Bundle savedInstanceState) {
- String packages = savedInstanceState.getString(EXTRA_CUSTOM_THEME_OPTION);
+ String packages = savedInstanceState.getString(KEY_STATE_CURRENT_SELECTION);
if (!TextUtils.isEmpty(packages)) {
try {
mBuilder = themeBundleProvider.parseCustomTheme(packages);