Changeset 5738 for pjproject/trunk/pjsip-apps/src/swig/java/android/app
- Timestamp:
- Feb 16, 2018 9:37:00 AM (7 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MainActivity.java
r5649 r5738 233 233 } else if (m.what == MSG_TYPE.CALL_STATE) { 234 234 235 CallInfo ci = (CallInfo) m.obj; 236 237 /* Forward the message to CallActivity */ 238 if (CallActivity.handler_ != null) { 235 MyCall call = (MyCall) m.obj; 236 CallInfo ci; 237 try { 238 ci = call.getInfo(); 239 } catch (Exception e) { 240 ci = null; 241 } 242 243 /* Forward the call info to CallActivity */ 244 if (ci != null && CallActivity.handler_ != null) { 239 245 Message m2 = Message.obtain(CallActivity.handler_, 240 246 MSG_TYPE.CALL_STATE, ci); 241 247 m2.sendToTarget(); 248 } 249 250 if (ci != null && 251 ci.getState() == pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) 252 { 253 call.delete(); 242 254 } 243 255 … … 602 614 ci = null; 603 615 } 604 Message m = Message.obtain(handler, MSG_TYPE.CALL_STATE, c i);616 Message m = Message.obtain(handler, MSG_TYPE.CALL_STATE, call); 605 617 m.sendToTarget(); 606 618 -
pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MyApp.java
r5649 r5738 62 62 public void onCallState(OnCallStateParam prm) 63 63 { 64 MyApp.observer.notifyCallState(this); 65 try { 66 CallInfo ci = getInfo(); 67 if (ci.getState() == 68 pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) 69 { 70 MyApp.ep.utilLogWrite(3, "MyCall", this.dump(true, "")); 71 this.delete(); 72 } 73 } catch (Exception e) { 74 return; 75 } 64 try { 65 CallInfo ci = getInfo(); 66 if (ci.getState() == 67 pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) 68 { 69 MyApp.ep.utilLogWrite(3, "MyCall", this.dump(true, "")); 70 } 71 } catch (Exception e) { 72 } 73 74 // Should not delete this call instance (self) in this context, 75 // so the observer should manage this call instance deletion 76 // out of this callback context. 77 MyApp.observer.notifyCallState(this); 76 78 } 77 79
Note: See TracChangeset
for help on using the changeset viewer.