]> sjero.net Git - linphone/commitdiff
replace vectores by arrays in linphone core api
authorJehan Monnier <jehan.monnier@linphone.org>
Wed, 2 May 2012 08:12:08 +0000 (10:12 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Wed, 2 May 2012 08:12:08 +0000 (10:12 +0200)
LinphoneCoreImpl.java

index 0dd655fcd77d356265d02e9a6a209a2eb26255c3..0b2996a03ab6899adf0c2d977fa78a37653f7f9c 100644 (file)
@@ -195,11 +195,11 @@ class LinphoneCoreImpl implements LinphoneCore {
                acceptCall(nativePtr,((LinphoneCallImpl)aCall).nativePtr);
                
        }
-       public synchronized Vector<LinphoneCallLog> getCallLogs() {
+       public synchronized LinphoneCallLog[] getCallLogs() {
                isValid();
-               Vector<LinphoneCallLog> logs = new Vector<LinphoneCallLog>()
+               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<LinphoneCall> calls = new Vector<LinphoneCall>(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;
        }