Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08ae3a7d authored by guangl's avatar guangl Committed by Gerrit - the friendly Code Review server
Browse files

Settings: Fix settings force close in monkey test.

userDictionaryPreference null pointer causes settings force close in
monkey test.

Add null pointer protect.

Change-Id: I4a8cce4a2e228bc405e896cd77fc9c3756ca265d
CRs-Fixed: 1069216
parent 9462b4cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -211,6 +211,9 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
    }

    private void updateUserDictionaryPreference(Preference userDictionaryPreference) {
        if (userDictionaryPreference == null) {
            return;
        }
        final Activity activity = getActivity();
        final TreeSet<String> localeSet = UserDictionaryList.getUserDictionaryLocalesSet(activity);
        if (null == localeSet) {