Expose setLocalDescription() in SDK for Android.

Parameterless sLD is part of perfect negotiation algo.

Bug: webrtc:12609
Change-Id: I13a6b0bf29db8b4e984da9b2645f9bfdb23e074c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212605
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33641}
This commit is contained in:
Yura Yaroshevich
2021-03-22 11:45:43 +03:00
committed by Commit Bot
parent d69e0709c8
commit 4e9e723dae
4 changed files with 58 additions and 27 deletions

View File

@ -883,6 +883,10 @@ public class PeerConnection {
nativeCreateAnswer(observer, constraints);
}
public void setLocalDescription(SdpObserver observer) {
nativeSetLocalDescriptionAutomatically(observer);
}
public void setLocalDescription(SdpObserver observer, SessionDescription sdp) {
nativeSetLocalDescription(observer, sdp);
}
@ -1272,6 +1276,7 @@ public class PeerConnection {
private native DataChannel nativeCreateDataChannel(String label, DataChannel.Init init);
private native void nativeCreateOffer(SdpObserver observer, MediaConstraints constraints);
private native void nativeCreateAnswer(SdpObserver observer, MediaConstraints constraints);
private native void nativeSetLocalDescriptionAutomatically(SdpObserver observer);
private native void nativeSetLocalDescription(SdpObserver observer, SessionDescription sdp);
private native void nativeSetRemoteDescription(SdpObserver observer, SessionDescription sdp);
private native void nativeRestartIce();