When remote accept phone call, local perform hangup and disconnect to remote. The first, local check mediastream not null and are opened. Local call close method and get Null pointer exception after that.
Reproduce step:
A call to B.
B accept call.
A press cancel button.
Actual:
A crash application.
Expect:
Check null before call.
Exception information:
io.skyway.skw_sample E/AndroidRuntime: FATAL EXCEPTION: io.skyway.peer.handler
Process: io.skyway.skw_sample, PID: 17485
method 'void io.skyway.Peer.Peer.queueWSMessage(org.json.JSONObject)' on a null object reference
at io.skyway.Peer.BaseConnection$4.run(BaseConnection.java:867)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
When remote accept phone call. this code above will be called. This code delay for 0.5 second and if local call close() method during this time, BaseConnection.this.provider will be clear. Only BaseConnection.this._jsonOffer had been checked null. Therefore, Null pointer exception occurred.
When remote accept phone call, local perform hangup and disconnect to remote. The first, local check mediastream not null and are opened. Local call close method and get Null pointer exception after that.
Reproduce step:
cancel
button.Actual:
Expect:
Exception information:
Reason: