diff --git a/res/values/strings.xml b/res/values/strings.xml
index d15c600ea21..9842fb7d158 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2633,6 +2633,8 @@
card numbers. It comes from the app
%1$s.
Use this spell checker?
+
+ Failed to open settings for %1$s
Mouse/trackpad
diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java
index 6402dff47b9..c736b2f5d36 100644
--- a/src/com/android/settings/inputmethod/InputMethodPreference.java
+++ b/src/com/android/settings/inputmethod/InputMethodPreference.java
@@ -39,6 +39,7 @@ import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.ImageView;
import android.widget.TextView;
+import android.widget.Toast;
import java.util.Comparator;
import java.util.List;
@@ -126,8 +127,12 @@ public class InputMethodPreference extends CheckBoxPreference
mFragment.startActivity(mSettingsIntent);
} catch (ActivityNotFoundException e) {
Log.d(TAG, "IME's Settings Activity Not Found: " + e);
- // If the IME's settings activity does not exist, we can just
- // do nothing...
+ final String msg = mFragment.getString(
+ R.string.failed_to_open_app_settings_toast,
+ mImi.loadLabel(
+ mFragment.getActivity().getPackageManager()));
+ Toast.makeText(
+ mFragment.getActivity(), msg, Toast.LENGTH_LONG).show();
}
}
});
diff --git a/src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java b/src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java
index 2a62017de42..5b28142e3f1 100644
--- a/src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java
+++ b/src/com/android/settings/inputmethod/SingleSpellCheckerPreference.java
@@ -19,6 +19,7 @@ package com.android.settings.inputmethod;
import com.android.settings.R;
import android.app.AlertDialog;
+import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
@@ -33,6 +34,7 @@ import android.view.textservice.TextServicesManager;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.TextView;
+import android.widget.Toast;
public class SingleSpellCheckerPreference extends Preference {
private static final float DISABLED_ALPHA = 0.4f;
@@ -177,7 +179,13 @@ public class SingleSpellCheckerPreference extends Preference {
private void onSettingsButtonClicked(View arg0) {
if (mFragment != null && mSettingsIntent != null) {
- mFragment.startActivity(mSettingsIntent);
+ try {
+ mFragment.startActivity(mSettingsIntent);
+ } catch (ActivityNotFoundException e) {
+ final String msg = mFragment.getString(R.string.failed_to_open_app_settings_toast,
+ mSpellCheckerInfo.loadLabel(mFragment.getActivity().getPackageManager()));
+ Toast.makeText(mFragment.getActivity(), msg, Toast.LENGTH_LONG).show();
+ }
}
}