summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-10-16 16:33:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-16 16:33:56 +0000
commitcdcba9ce5f44cf4cad9e308919272db4e15e9717 (patch)
treeb356e741d1d45a698ddf79780236915f211f20c4 /src
parentde005547bae3799265fdad8f61720a82241f4b07 (diff)
parent77b11fa4707dffe94d253e951e5409d3c3f5a130 (diff)
downloadpackages_apps_Settings-cdcba9ce5f44cf4cad9e308919272db4e15e9717.zip
packages_apps_Settings-cdcba9ce5f44cf4cad9e308919272db4e15e9717.tar.gz
packages_apps_Settings-cdcba9ce5f44cf4cad9e308919272db4e15e9717.tar.bz2
Merge "Fix crashes in Settings" into mnc-dr-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
index 2901673..587f41c 100644
--- a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
+++ b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
@@ -56,7 +56,10 @@ public class UserDictionaryAddWordActivity extends Activity {
// The following will get the EXTRA_WORD and EXTRA_LOCALE fields that are in the intent.
// We do need to add the action by hand, because UserDictionaryAddWordContents expects
// it to be in the bundle, in the EXTRA_MODE key.
- final Bundle args = intent.getExtras();
+ Bundle args = intent.getExtras();
+ if (args == null) {
+ args = new Bundle();
+ }
args.putInt(UserDictionaryAddWordContents.EXTRA_MODE, mode);
if (null != savedInstanceState) {
@@ -74,6 +77,7 @@ public class UserDictionaryAddWordActivity extends Activity {
private void reportBackToCaller(final int resultCode, final Bundle result) {
final Intent senderIntent = getIntent();
+ if (senderIntent.getExtras() == null) return;
final Object listener = senderIntent.getExtras().get("listener");
if (!(listener instanceof Messenger)) return; // This will work if listener is null too.
final Messenger messenger = (Messenger)listener;