webrtc-jingle-client icon indicating copy to clipboard operation
webrtc-jingle-client copied to clipboard

Missing logic after Java code refactor

Open wjwarren opened this issue 12 years ago • 3 comments

It seems the refactoring of the Java code by @jreyes removed some logic that used to be in the VoiceClient.

The handleAudioPlayout() callback seems to have disappeared. I believe this method was specifically added to avoid some audio issues on certain devices.

The destroy() method has disappeared as well, @lukeweber added this method to perform some clean up actions when the VoiceClient was no longer needed. Right now when discarding the VoiceClient and setting the different managers (setCallManager, setConnectionManager and setBuddyManager) to null, it seems to be throwing some NullPointerExceptions[1] at a later point.

The other thing I noticed is that the Singleton pattern has been removed from the VoiceClient. I'm not particularly attached to the Singleton pattern, but just curious as to why it has been removed.

[1]

E/AndroidRuntime(11818): java.lang.NullPointerException
E/AndroidRuntime(11818):    at com.tuenti.voice.core.VoiceClient.handleXmppError(VoiceClient.java:194)
E/AndroidRuntime(11818):    at com.tuenti.voice.core.VoiceClient.dispatchNativeEvent(VoiceClient.java:238)

wjwarren avatar Dec 21 '12 15:12 wjwarren

Added fix for nullpointerexception.

The singleton was removed, because that pattern should be applied to the Application object. There was an error with remote process creating a duplicate VoiceClient in a remote service and in the activities.

jreyes avatar Dec 21 '12 18:12 jreyes

Merged

lukeweber avatar Dec 27 '12 09:12 lukeweber

Thanks for fixing the null pointer issues Johann!

What about the missing handleAudioPlayout() callback?

wjwarren avatar Jan 02 '13 11:01 wjwarren