am 262d5bd9: Don\'t override EXTRA_SHOW_FRAGMENT if exists

* commit '262d5bd9f964d7fb18d96ec2ccf821b042aa3a3a':
  Don't override EXTRA_SHOW_FRAGMENT if exists
main
Tadashi G. Takaoka 2013-04-10 00:47:30 -07:00 committed by Android Git Automerger
commit c35bca6856
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;
}