Changeset 4733


Ignore:
Timestamp:
Feb 5, 2014 6:34:00 AM (8 years ago)
Author:
nanang
Message:

Re #1716: Fixed crash in adding buddy, caused by immediate buddy state notification right after adding buddy to account, while UI buddy list has not been updated yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MainActivity.java

    r4704 r4733  
    180180                        MyBuddy buddy = (MyBuddy) m.obj; 
    181181                        int idx = account.buddyList.indexOf(buddy); 
    182                         if (idx >= 0) { 
     182 
     183                        /* Update buddy status text, if buddy is valid and 
     184                         * the buddy lists in account and UI are sync-ed. 
     185                         */ 
     186                        if (idx >= 0 && account.buddyList.size() == buddyList.size()) { 
    183187                                buddyList.get(idx).put("status", buddy.getStatusText()); 
    184188                                buddyListAdapter.notifyDataSetChanged(); 
Note: See TracChangeset for help on using the changeset viewer.