Merge "Settings: only replace content with new fragment if it has no saved instance state." into ub-launcher3-dorval-polish
diff --git a/src/com/android/launcher3/SettingsActivity.java b/src/com/android/launcher3/SettingsActivity.java
index b7b75f8..a34e469 100644
--- a/src/com/android/launcher3/SettingsActivity.java
+++ b/src/com/android/launcher3/SettingsActivity.java
@@ -42,10 +42,12 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- // Display the fragment as the main content.
- getFragmentManager().beginTransaction()
- .replace(android.R.id.content, new LauncherSettingsFragment())
- .commit();
+ if (savedInstanceState == null) {
+ // Display the fragment as the main content.
+ getFragmentManager().beginTransaction()
+ .replace(android.R.id.content, new LauncherSettingsFragment())
+ .commit();
+ }
}
/**