summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/inputmethod
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2011-08-10 16:58:53 +0900
committerKen Wakasa <kwakasa@google.com>2011-08-10 16:58:53 +0900
commit1c2b175d7ab8da48a12191c4930bd4ed451a9952 (patch)
tree4624a3ae55a3ad1c886b38a3a1011c30ae9b62b4 /src/com/android/settings/inputmethod
parent1a787cf362c8a405df9d6a5b052ce17199bd70dd (diff)
downloadpackages_apps_Settings-1c2b175d7ab8da48a12191c4930bd4ed451a9952.tar.gz
packages_apps_Settings-1c2b175d7ab8da48a12191c4930bd4ed451a9952.tar.bz2
packages_apps_Settings-1c2b175d7ab8da48a12191c4930bd4ed451a9952.zip
Prevent crashes when IME's settings activity is missing
bug: 5029444 Change-Id: I5c045123dbca2581f2e7d9f602e7511398b83504
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r--src/com/android/settings/inputmethod/InputMethodPreference.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java
index 21057a6a5..f490fd2e4 100644
--- a/src/com/android/settings/inputmethod/InputMethodPreference.java
+++ b/src/com/android/settings/inputmethod/InputMethodPreference.java
@@ -21,6 +21,7 @@ import com.android.settings.SettingsPreferenceFragment;
import android.app.AlertDialog;
import android.app.Fragment;
+import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
@@ -102,7 +103,13 @@ public class InputMethodPreference extends CheckBoxPreference
new OnClickListener() {
@Override
public void onClick(View arg0) {
- mFragment.startActivity(mSettingsIntent);
+ try {
+ 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...
+ }
}
});
}