am 85eba056: am c5182c9a: Correspond to the security related API change for PreferenceActivity
* commit '85eba056f2326f5e3015e4153123d40b6f7cd98f': Correspond to the security related API change for PreferenceActivitymain
commit
96fdbaa367
|
@ -24,6 +24,8 @@ import android.preference.PreferenceActivity;
|
||||||
* Preference screen.
|
* Preference screen.
|
||||||
*/
|
*/
|
||||||
public final class DictionarySettingsActivity extends PreferenceActivity {
|
public final class DictionarySettingsActivity extends PreferenceActivity {
|
||||||
|
private static final String DEFAULT_FRAGMENT = DictionarySettingsFragment.class.getName();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -32,11 +34,17 @@ public final class DictionarySettingsActivity extends PreferenceActivity {
|
||||||
@Override
|
@Override
|
||||||
public Intent getIntent() {
|
public Intent getIntent() {
|
||||||
final Intent modIntent = new Intent(super.getIntent());
|
final Intent modIntent = new Intent(super.getIntent());
|
||||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DictionarySettingsFragment.class.getName());
|
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
|
||||||
modIntent.putExtra(EXTRA_NO_HEADERS, true);
|
modIntent.putExtra(EXTRA_NO_HEADERS, true);
|
||||||
// Important note : the original intent should contain a String extra with the key
|
// Important note : the original intent should contain a String extra with the key
|
||||||
// DictionarySettingsFragment.DICT_SETTINGS_FRAGMENT_CLIENT_ID_ARGUMENT so that the
|
// DictionarySettingsFragment.DICT_SETTINGS_FRAGMENT_CLIENT_ID_ARGUMENT so that the
|
||||||
// fragment can know who the client is.
|
// fragment can know who the client is.
|
||||||
return modIntent;
|
return modIntent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Uncomment the override annotation once we start using SDK version 19.
|
||||||
|
// @Override
|
||||||
|
public boolean isValidFragment(String fragmentName) {
|
||||||
|
return fragmentName.equals(DEFAULT_FRAGMENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,10 @@ public final class DebugSettingsActivity extends PreferenceActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setTitle(R.string.english_ime_debug_settings);
|
setTitle(R.string.english_ime_debug_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Uncomment the override annotation once we start using SDK version 19.
|
||||||
|
// @Override
|
||||||
|
public boolean isValidFragment(String fragmentName) {
|
||||||
|
return fragmentName.equals(DEFAULT_FRAGMENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,4 +32,10 @@ public final class SettingsActivity extends PreferenceActivity {
|
||||||
intent.putExtra(EXTRA_NO_HEADERS, true);
|
intent.putExtra(EXTRA_NO_HEADERS, true);
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Uncomment the override annotation once we start using SDK version 19.
|
||||||
|
// @Override
|
||||||
|
public boolean isValidFragment(String fragmentName) {
|
||||||
|
return fragmentName.equals(DEFAULT_FRAGMENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ import android.preference.PreferenceActivity;
|
||||||
* Spell checker preference screen.
|
* Spell checker preference screen.
|
||||||
*/
|
*/
|
||||||
public final class SpellCheckerSettingsActivity extends PreferenceActivity {
|
public final class SpellCheckerSettingsActivity extends PreferenceActivity {
|
||||||
|
private static final String DEFAULT_FRAGMENT = SpellCheckerSettingsFragment.class.getName();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -32,8 +34,14 @@ public final class SpellCheckerSettingsActivity extends PreferenceActivity {
|
||||||
@Override
|
@Override
|
||||||
public Intent getIntent() {
|
public Intent getIntent() {
|
||||||
final Intent modIntent = new Intent(super.getIntent());
|
final Intent modIntent = new Intent(super.getIntent());
|
||||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, SpellCheckerSettingsFragment.class.getName());
|
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
|
||||||
modIntent.putExtra(EXTRA_NO_HEADERS, true);
|
modIntent.putExtra(EXTRA_NO_HEADERS, true);
|
||||||
return modIntent;
|
return modIntent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Uncomment the override annotation once we start using SDK version 19.
|
||||||
|
// @Override
|
||||||
|
public boolean isValidFragment(String fragmentName) {
|
||||||
|
return fragmentName.equals(DEFAULT_FRAGMENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue