Skip to content
Snippets Groups Projects
Commit b534b626 authored by Mohamed Amine Younes Bouacida's avatar Mohamed Amine Younes Bouacida Committed by Adrien Béraud
Browse files

swig 4: bump to swig 4

+ update java files to matches the latest Swig Data Stuctures
+ update Docker file

Change-Id: If634eea4b13688aba45c628ab0cf40bc07008d30
parent 66ea57ac
Branches
Tags
No related merge requests found
......@@ -28,13 +28,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
software-properties-common \
ssh \
swig \
unzip \
wget \
curl \
yasm \
nasm \
zip \
libpcre3 \
libpcre3-dev \
&& locale-gen $LANG $LC_ALL && update-locale $LANG $LC_ALL
# Android SDK tools
......@@ -43,6 +44,12 @@ RUN wget -O /tmp/android-tools.zip https://dl.google.com/android/repository/sdk-
unzip -q -d /opt/android-sdk /tmp/android-tools.zip && \
rm -f /tmp/android-tools.zip && \
chown -R root:root /opt/android-sdk
# Swig 4.0.1
RUN wget -O /tmp/swig.tar.gz https://github.com/swig/swig/archive/rel-4.0.1.tar.gz
RUN tar xzf /tmp/swig.tar.gz -C /opt
RUN cd /opt/swig-rel-4.0.1/ && ./autogen.sh && ./configure && make && make install
ENV ANDROID_HOME=/opt/android-sdk
ENV PATH=${PATH}:${ANDROID_HOME}/tools/bin
RUN (while sleep 1; do echo "y"; done) | sdkmanager --update
......
......@@ -216,10 +216,10 @@ public class CameraService {
rates.clear();
fillCameraInfo(p, camId, formats, sizes, rates, minVideoSize);
sizes.add(p.size.x);
sizes.add(p.size.y);
sizes.add(p.size.y);
sizes.add(p.size.x);
sizes.add((long) p.size.x);
sizes.add((long) p.size.y);
sizes.add((long) p.size.y);
sizes.add((long) p.size.x);
mNativeParams.put(camId, p);
}
......@@ -286,8 +286,8 @@ public class CameraService {
StringMap toMap() {
StringMap map = new StringMap();
map.set("size", size.x + "x" + size.y);
map.set("rate", Long.toString(rate));
map.put("size", size.x + "x" + size.y);
map.put("rate", Long.toString(rate));
return map;
}
}
......
......@@ -706,7 +706,7 @@ public class AccountService {
mExecutor.execute(() -> {
Log.i(TAG, "renameDevice() thread running... " + newName);
StringMap details = Ringservice.getAccountDetails(accountId);
details.set(ConfigKey.ACCOUNT_DEVICE_NAME.key(), newName);
details.put(ConfigKey.ACCOUNT_DEVICE_NAME.key(), newName);
Ringservice.setAccountDetails(accountId, details);
account.setDetail(ConfigKey.ACCOUNT_DEVICE_NAME, newName);
account.setDevices(Ringservice.getKnownRingDevices(accountId).toNative());
......@@ -736,7 +736,8 @@ public class AccountService {
*/
public void setActiveCodecList(final String accountId, final List<Long> codecs) {
mExecutor.execute(() -> {
UintVect list = new UintVect(codecs.size());
UintVect list = new UintVect();
list.reserve(codecs.size());
for (Long codec : codecs) {
list.add(codec);
}
......@@ -1473,7 +1474,7 @@ public class AccountService {
Log.d(TAG, (enabled ? "Enabling" : "Disabling") + " proxy for account " + acc.getAccountID());
acc.setDhtProxyEnabled(enabled);
StringMap details = Ringservice.getAccountDetails(acc.getAccountID());
details.set(ConfigKey.PROXY_ENABLED.key(), enabled ? "true" : "false");
details.put(ConfigKey.PROXY_ENABLED.key(), enabled ? "true" : "false");
Ringservice.setAccountDetails(acc.getAccountID(), details);
}
}
......
......@@ -146,7 +146,7 @@ public class DaemonService {
@Override
public void incomingAccountMessage(String accountId, String from, StringMap messages) {
if (messages == null || messages.empty())
if (messages == null || messages.isEmpty())
return;
Map<String, String> jmessages = messages.toNativeFromUtf8();
mExecutor.submit(() -> mAccountService.incomingAccountMessage(accountId, null, from, jmessages));
......@@ -244,7 +244,7 @@ public class DaemonService {
@Override
public void incomingMessage(String callId, String from, StringMap messages) {
if (messages == null || messages.empty())
if (messages == null || messages.isEmpty())
return;
Map<String, String> jmessages = messages.toNativeFromUtf8();
mExecutor.submit(() -> mCallService.incomingMessage(callId, from, jmessages));
......
......@@ -38,7 +38,8 @@ public class ProfileChunk {
Log.d(TAG, "Create ProfileChink of size " + numberOfParts);
this.mInsertedParts = 0;
this.mNumberOfParts = numberOfParts;
this.mParts = new StringVect(mNumberOfParts + 1);
this.mParts = new StringVect();
this.mParts.reserve(mNumberOfParts + 1);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment