mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix inconsistency when a second call arrives
This commit is contained in:
parent
698e7ac2b2
commit
d5b7321a65
2 changed files with 4 additions and 12 deletions
|
|
@ -23,8 +23,7 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
|
||||
protected final long nativePtr;
|
||||
boolean ownPtr = false;
|
||||
native private void ref(long ownPtr);
|
||||
native private void unref(long ownPtr);
|
||||
native private void finalize(long nativePtr);
|
||||
native private long getCallLog(long nativePtr);
|
||||
private native boolean isIncoming(long nativePtr);
|
||||
native private long getRemoteAddress(long nativePtr);
|
||||
|
|
@ -46,10 +45,9 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
|
||||
protected LinphoneCallImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
ref(nativePtr);
|
||||
}
|
||||
protected void finalize() throws Throwable {
|
||||
unref(nativePtr);
|
||||
finalize(nativePtr);
|
||||
}
|
||||
public LinphoneCallLog getCallLog() {
|
||||
long lNativePtr = getCallLog(nativePtr);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native int enablePayloadType(long nativePtr, long payloadType, boolean enable);
|
||||
private native void enableEchoCancellation(long nativePtr,boolean enable);
|
||||
private native boolean isEchoCancellationEnabled(long nativePtr);
|
||||
private native long getCurrentCall(long nativePtr) ;
|
||||
private native Object getCurrentCall(long nativePtr) ;
|
||||
private native void playDtmf(long nativePtr,char dtmf,int duration);
|
||||
private native void stopDtmf(long nativePtr);
|
||||
private native void setVideoWindowId(long nativePtr, Object wid);
|
||||
|
|
@ -285,12 +285,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
|
||||
public synchronized LinphoneCall getCurrentCall() {
|
||||
isValid();
|
||||
long lNativePtr = getCurrentCall(nativePtr);
|
||||
if (lNativePtr!=0) {
|
||||
return new LinphoneCallImpl(lNativePtr);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return (LinphoneCall)getCurrentCall(nativePtr);
|
||||
}
|
||||
|
||||
public int getPlayLevel() {
|
||||
|
|
@ -554,5 +549,4 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue