From 262d5bd9f964d7fb18d96ec2ccf821b042aa3a3a Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 10 Apr 2013 16:21:20 +0900 Subject: [PATCH] Don't override EXTRA_SHOW_FRAGMENT if exists Bug: 8541190 Change-Id: I37d3de12558efd55f157389d2e0b51fc83dc5da1 --- java/src/com/android/inputmethod/latin/SettingsActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/SettingsActivity.java b/java/src/com/android/inputmethod/latin/SettingsActivity.java index 99b572e06..37ac2e35c 100644 --- a/java/src/com/android/inputmethod/latin/SettingsActivity.java +++ b/java/src/com/android/inputmethod/latin/SettingsActivity.java @@ -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; }