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

Commit ab989ac3 authored by Sascha Prueter's avatar Sascha Prueter Committed by Android Git Automerger
Browse files

am 8149820c: am 25458528: am dd2ed93e: Merge "Handle "CODE_ALREADY_PRESENT"...

am 8149820c: am 25458528: am dd2ed93e: Merge "Handle "CODE_ALREADY_PRESENT" message from Settings app" into jb-mr1.1-dev

* commit '8149820c':
  Handle "CODE_ALREADY_PRESENT" message from Settings app
parents c1b8f785 8149820c
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -3844,8 +3844,9 @@ public class Editor {

        @Override
        public void handleMessage(Message msg) {
            final int code = msg.what;
            if (code == 0) { /* CODE_WORD_ADDED */
            switch(msg.what) {
                case 0: /* CODE_WORD_ADDED */
                case 2: /* CODE_ALREADY_PRESENT */
                    if (!(msg.obj instanceof Bundle)) {
                        Log.w(TAG, "Illegal message. Abort handling onUserDictionaryAdded.");
                        return;
@@ -3854,6 +3855,9 @@ public class Editor {
                    final String originalWord = bundle.getString("originalWord");
                    final String addedWord = bundle.getString("word");
                    onUserDictionaryAdded(originalWord, addedWord);
                    return;
                default:
                    return;
            }
        }