summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/inputmethod
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r--src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java6
-rw-r--r--src/com/android/settings/inputmethod/InputMethodPreference.java16
-rw-r--r--src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java2
-rw-r--r--src/com/android/settings/inputmethod/UserDictionaryAddWordFragment.java6
4 files changed, 12 insertions, 18 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
index 5693e209e..67e32ab56 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
@@ -15,13 +15,11 @@
*/
package com.android.settings.inputmethod;
-import android.app.Fragment;
import android.content.Intent;
-import android.preference.PreferenceActivity;
-import com.android.settings.ChooseLockPassword.ChooseLockPasswordFragment;
+import com.android.settings.SettingsActivity;
-public class InputMethodAndSubtypeEnablerActivity extends PreferenceActivity {
+public class InputMethodAndSubtypeEnablerActivity extends SettingsActivity {
@Override
public Intent getIntent() {
final Intent modIntent = new Intent(super.getIntent());
diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java
index aa6430fc9..1d920de78 100644
--- a/src/com/android/settings/inputmethod/InputMethodPreference.java
+++ b/src/com/android/settings/inputmethod/InputMethodPreference.java
@@ -18,6 +18,7 @@ package com.android.settings.inputmethod;
import com.android.internal.inputmethod.InputMethodUtils;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils;
@@ -31,8 +32,6 @@ import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
@@ -115,7 +114,7 @@ public class InputMethodPreference extends CheckBoxPreference {
@Override
public boolean onLongClick(View arg0) {
final Bundle bundle = new Bundle();
- bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
+ bundle.putString(android.provider.Settings.EXTRA_INPUT_METHOD_ID, imiId);
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
0, bundle);
return true;
@@ -147,7 +146,7 @@ public class InputMethodPreference extends CheckBoxPreference {
@Override
public boolean onLongClick(View arg0) {
final Bundle bundle = new Bundle();
- bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
+ bundle.putString(android.provider.Settings.EXTRA_INPUT_METHOD_ID, imiId);
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
0, bundle);
return true;
@@ -206,13 +205,12 @@ public class InputMethodPreference extends CheckBoxPreference {
public static boolean startFragment(
Fragment fragment, String fragmentClass, int requestCode, Bundle extras) {
- if (fragment.getActivity() instanceof PreferenceActivity) {
- PreferenceActivity preferenceActivity = (PreferenceActivity)fragment.getActivity();
- preferenceActivity.startPreferencePanel(fragmentClass, extras, 0, null, fragment,
- requestCode);
+ if (fragment.getActivity() instanceof SettingsActivity) {
+ SettingsActivity sa = (SettingsActivity) fragment.getActivity();
+ sa.startPreferencePanel(fragmentClass, extras, 0, null, fragment, requestCode);
return true;
} else {
- Log.w(TAG, "Parent isn't PreferenceActivity, thus there's no way to launch the "
+ Log.w(TAG, "Parent isn't Settings, thus there's no way to launch the "
+ "given Fragment (name: " + fragmentClass + ", requestCode: " + requestCode
+ ")");
return false;
diff --git a/src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java b/src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java
index 451b36ea6..c77b2c9f6 100644
--- a/src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java
+++ b/src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java
@@ -17,7 +17,6 @@
package com.android.settings.inputmethod;
import com.android.settings.R;
-import com.android.settings.Settings.KeyboardLayoutPickerActivity;
import android.app.AlertDialog;
import android.app.Activity;
@@ -29,7 +28,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.Loader;
-import android.content.res.Resources;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.InputManager;
import android.hardware.input.KeyboardLayout;
diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordFragment.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordFragment.java
index 86c3e79d8..4f231cbbf 100644
--- a/src/com/android/settings/inputmethod/UserDictionaryAddWordFragment.java
+++ b/src/com/android/settings/inputmethod/UserDictionaryAddWordFragment.java
@@ -18,7 +18,6 @@ package com.android.settings.inputmethod;
import android.app.Fragment;
import android.os.Bundle;
-import android.preference.PreferenceActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -29,6 +28,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.inputmethod.UserDictionaryAddWordContents.LocaleRenderer;
import java.util.ArrayList;
@@ -137,8 +137,8 @@ public class UserDictionaryAddWordFragment extends Fragment
final long id) {
final LocaleRenderer locale = (LocaleRenderer)parent.getItemAtPosition(pos);
if (locale.isMoreLanguages()) {
- PreferenceActivity preferenceActivity = (PreferenceActivity)getActivity();
- preferenceActivity.startPreferenceFragment(new UserDictionaryLocalePicker(this), true);
+ SettingsActivity sa = (SettingsActivity)getActivity();
+ sa.startPreferenceFragment(new UserDictionaryLocalePicker(this), true);
} else {
mContents.updateLocale(locale.getLocaleString());
}