Settings: only replace content with new fragment if it has no saved

instance state.

Bug: 63141698
Change-Id: Ifdaca42224199cfd8fdd2fc01c3760faecf35e2d
This commit is contained in:
Mario Bertschler
2017-06-30 18:51:46 -07:00
parent ac648a9249
commit 2de2d6781b

View File

@@ -42,10 +42,12 @@ public class SettingsActivity extends Activity {
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();
}
}
/**