Merge "Settings: only replace content with new fragment if it has no saved instance state." into ub-launcher3-dorval-polish

This commit is contained in:
Mario Bertschler
2017-07-05 17:28:53 +00:00
committed by Android (Google) Code Review
@@ -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();
}
}
/**