Fix dupicate preference in personal dict

Duplicate preference is added on the
UserDictionaryListPreferenceController. With this change, we check
before adding.

Fix: 129079798
Test: Manually using steps mentioned in bug
Change-Id: If73880f3be460f377b8985a44fc9f9fbe6370c06
diff --git a/src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java b/src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java
index 4a409e1..9343493 100644
--- a/src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java
+++ b/src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java
@@ -174,7 +174,10 @@
             mScreen.addPreference(createUserDictionaryPreference(null));
         } else {
             for (String locale : localeSet) {
-                mScreen.addPreference(createUserDictionaryPreference(locale));
+                final Preference pref = createUserDictionaryPreference(locale);
+                if (mScreen.findPreference(pref.getKey()) == null) {
+                    mScreen.addPreference(pref);
+                }
             }
         }
     }