From 4f108428984e0e32a2deb69caa2374b6b6e7eccd Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 2 May 2012 10:12:08 +0200 Subject: [PATCH] replace vectores by arrays in linphone core api --- LinphoneCoreImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/LinphoneCoreImpl.java b/LinphoneCoreImpl.java index 0dd655fc..0b2996a0 100644 --- a/LinphoneCoreImpl.java +++ b/LinphoneCoreImpl.java @@ -195,11 +195,11 @@ class LinphoneCoreImpl implements LinphoneCore { acceptCall(nativePtr,((LinphoneCallImpl)aCall).nativePtr); } - public synchronized Vector getCallLogs() { + public synchronized LinphoneCallLog[] getCallLogs() { isValid(); - Vector logs = new Vector(); + LinphoneCallLog[] logs = new LinphoneCallLog[getNumberOfCallLogs(nativePtr)]; for (int i=0;i < getNumberOfCallLogs(nativePtr);i++) { - logs.add(new LinphoneCallLogImpl(getCallLog(nativePtr, i))); + logs[i] = new LinphoneCallLogImpl(getCallLog(nativePtr, i)); } return logs; } @@ -540,11 +540,11 @@ class LinphoneCoreImpl implements LinphoneCore { terminateAllCalls(nativePtr); } private native Object getCall(long nativePtr, int position); - @SuppressWarnings("unchecked") public synchronized Vector getCalls() { + public synchronized LinphoneCall[] getCalls() { int size = getCallsNb(nativePtr); - Vector calls = new Vector(size); + LinphoneCall[] calls = new LinphoneCall[size]; for (int i=0; i < size; i++) { - calls.add((LinphoneCall)getCall(nativePtr, i)); + calls[i]=((LinphoneCall)getCall(nativePtr, i)); } return calls; } -- 2.39.2