Skip to content
Snippets Groups Projects
Commit 97dcf02a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

build: update minimum SDK version to 21 (5.0 Lollipop)

Change-Id: I75397fb39bd61383810933a91800305cebc298bf
parent c9126c97
No related branches found
No related tags found
No related merge requests found
...@@ -63,12 +63,11 @@ else ...@@ -63,12 +63,11 @@ else
fi fi
if [ "${HAVE_64}" = 1 ];then if [ "${HAVE_64}" = 1 ];then
ANDROID_API_VERS=21
LIBDIR=lib64 LIBDIR=lib64
else else
ANDROID_API_VERS=19
LIBDIR=lib LIBDIR=lib
fi fi
ANDROID_API_VERS=21
ANDROID_API=android-$ANDROID_API_VERS ANDROID_API=android-$ANDROID_API_VERS
export ANDROID_TOOLCHAIN="`pwd`/android-toolchain-$ANDROID_API_VERS-$PLATFORM_SHORT_ARCH" export ANDROID_TOOLCHAIN="`pwd`/android-toolchain-$ANDROID_API_VERS-$PLATFORM_SHORT_ARCH"
...@@ -115,12 +114,9 @@ if [ ! -d "$DAEMON_DIR" ]; then ...@@ -115,12 +114,9 @@ if [ ! -d "$DAEMON_DIR" ]; then
fi fi
# Setup LDFLAGS # Setup LDFLAGS
if [ ${ANDROID_ABI} = "armeabi-v7a-hard" ] ; then if [ ${ANDROID_ABI} = "armeabi-v7a" ] ; then
EXTRA_CFLAGS="${EXTRA_CFLAGS} -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16" EXTRA_CFLAGS="${EXTRA_CFLAGS} -march=armv7-a -mthumb"
EXTRA_LDFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mcpu=cortex-a8 -lm_hard -D_NDK_MATH_NO_SOFTFP=1" EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -march=armv7-a -mthumb"
elif [ ${ANDROID_ABI} = "armeabi-v7a" ] ; then
EXTRA_CFLAGS="${EXTRA_CFLAGS} -march=armv7-a -mthumb -mfloat-abi=softfp -mfpu=vfpv3-d16"
EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -march=armv7-a -mthumb -mfloat-abi=softfp -mfpu=vfpv3-d16"
elif [ ${ANDROID_ABI} = "arm64-v8a" ] ; then elif [ ${ANDROID_ABI} = "arm64-v8a" ] ; then
EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${ANDROID_TOOLCHAIN}/sysroot/usr/lib -L${ANDROID_TOOLCHAIN}/${TARGET_TUPLE}/lib" EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${ANDROID_TOOLCHAIN}/sysroot/usr/lib -L${ANDROID_TOOLCHAIN}/${TARGET_TUPLE}/lib"
fi fi
...@@ -168,11 +164,6 @@ mkdir -p contrib/${TARGET_TUPLE}/lib/pkgconfig ...@@ -168,11 +164,6 @@ mkdir -p contrib/${TARGET_TUPLE}/lib/pkgconfig
cd $DAEMON_DIR/contrib/native-${TARGET_TUPLE} cd $DAEMON_DIR/contrib/native-${TARGET_TUPLE}
../bootstrap --host=${TARGET_TUPLE} --disable-libav --enable-ffmpeg --disable-speexdsp ../bootstrap --host=${TARGET_TUPLE} --disable-libav --enable-ffmpeg --disable-speexdsp
# Some libraries have arm assembly which won't build in thumb mode
# We append -marm to the CFLAGS of these libs to disable thumb mode
[ ${ANDROID_ABI} = "armeabi-v7a" ] && echo "NOTHUMB := -marm" >> config.mak
[ ${ANDROID_ABI} = "armeabi-v7a-hard" ] && echo "NOTHUMB := -marm" >> config.mak
# Always strip symbols for libring.so remove it if you want to debug the daemon # Always strip symbols for libring.so remove it if you want to debug the daemon
STRIP_ARG="-s " STRIP_ARG="-s "
...@@ -264,10 +255,6 @@ STATIC_LIBS_ALL="-llog -lOpenSLES -landroid \ ...@@ -264,10 +255,6 @@ STATIC_LIBS_ALL="-llog -lOpenSLES -landroid \
-largon2 \ -largon2 \
-liconv" -liconv"
if [ ! "${HAVE_64}" = 1 ];then
STATIC_LIBS_ALL="${STATIC_LIBS_ALL} -landroid_support"
fi
LIBRING_JNI_DIR=${ANDROID_APP_DIR}/app/src/main/libs/${ANDROID_ABI} LIBRING_JNI_DIR=${ANDROID_APP_DIR}/app/src/main/libs/${ANDROID_ABI}
echo "Building Ring JNI library for Android to ${LIBRING_JNI_DIR}" echo "Building Ring JNI library for Android to ${LIBRING_JNI_DIR}"
......
...@@ -6,11 +6,10 @@ android { ...@@ -6,11 +6,10 @@ android {
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 138 versionCode 138
versionName "20181202" versionName "20181202"
vectorDrawables.useSupportLibrary = true
} }
sourceSets { sourceSets {
......
...@@ -220,12 +220,8 @@ public abstract class RingApplication extends Application { ...@@ -220,12 +220,8 @@ public abstract class RingApplication extends Application {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
sInstance = this; sInstance = this;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
// building injection dependency tree // building injection dependency tree
mRingInjectionComponent = DaggerRingInjectionComponent.builder() mRingInjectionComponent = DaggerRingInjectionComponent.builder()
.ringInjectionModule(new RingInjectionModule(this)) .ringInjectionModule(new RingInjectionModule(this))
......
...@@ -43,7 +43,6 @@ import android.text.Editable; ...@@ -43,7 +43,6 @@ import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
...@@ -52,7 +51,6 @@ import android.view.View; ...@@ -52,7 +51,6 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import java.io.File; import java.io.File;
...@@ -90,7 +88,6 @@ import cx.ring.utils.AndroidFileUtils; ...@@ -90,7 +88,6 @@ import cx.ring.utils.AndroidFileUtils;
import cx.ring.utils.ClipboardHelper; import cx.ring.utils.ClipboardHelper;
import cx.ring.utils.ContentUriHandler; import cx.ring.utils.ContentUriHandler;
import cx.ring.utils.MediaButtonsHelper; import cx.ring.utils.MediaButtonsHelper;
import cx.ring.views.MessageEditText;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment