Don't override EXTRA_SHOW_FRAGMENT if exists

Bug: 8541190
Change-Id: I37d3de12558efd55f157389d2e0b51fc83dc5da1
main
Tadashi G. Takaoka 2013-04-10 16:21:20 +09:00
parent 10af4b6e45
commit 262d5bd9f9
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,10 @@ public final class SettingsActivity extends PreferenceActivity {
@Override
public Intent getIntent() {
final Intent intent = super.getIntent();
intent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
final String fragment = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
if (fragment == null) {
intent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
}
intent.putExtra(EXTRA_NO_HEADERS, true);
return intent;
}