summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--android/AndroidManifest.xml2
-rwxr-xr-xandroid/build.py2
-rw-r--r--android/src/Main.java2
-rw-r--r--src/input/plugins/FileInputPlugin.cxx3
-rw-r--r--src/system/EPollFD.cxx15
6 files changed, 4 insertions, 22 deletions
diff --git a/Makefile.am b/Makefile.am
index efbe11dfd..95f888ff9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -294,7 +294,7 @@ libmpd.so: $(filter %.a,$(src_mpd_LDADD)) libmain.a
$(AM_V_CXXLD)$(CXXLD) -shared -Wl,--no-undefined,-shared,-Bsymbolic -llog -lz -o $@ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) src/libmain_a-Main.o $(src_mpd_LDADD) $(LIBS)
ANDROID_SDK_BUILD_TOOLS_VERSION = 27.0.0
-ANDROID_SDK_PLATFORM = android-17
+ANDROID_SDK_PLATFORM = android-21
ANDROID_BUILD_TOOLS_DIR = $(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)
ANDROID_SDK_PLATFORM_DIR = $(ANDROID_SDK)/platforms/$(ANDROID_SDK_PLATFORM)
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 09536d9c1..b6abd1124 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -5,7 +5,7 @@
android:versionCode="20"
android:versionName="0.20.21">
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
diff --git a/android/build.py b/android/build.py
index 33f08151e..2b29a3fcd 100755
--- a/android/build.py
+++ b/android/build.py
@@ -65,7 +65,7 @@ class AndroidNdkToolchain:
self.build_path = build_path
ndk_arch = abi_info['ndk_arch']
- android_api_level = '14'
+ android_api_level = '21'
ndk_platform = 'android-' + android_api_level
# select the NDK compiler
diff --git a/android/src/Main.java b/android/src/Main.java
index 933524398..da64a1976 100644
--- a/android/src/Main.java
+++ b/android/src/Main.java
@@ -49,7 +49,7 @@ public class Main extends Activity implements Runnable {
TextView tv = new TextView(this);
tv.setText("Failed to load the native MPD libary.\n" +
"Report this problem to us, and include the following information:\n" +
- "ABI=" + Build.CPU_ABI + "\n" +
+ "SUPPORTED_ABIS=" + String.join(", ", Build.SUPPORTED_ABIS) + "\n" +
"PRODUCT=" + Build.PRODUCT + "\n" +
"FINGERPRINT=" + Build.FINGERPRINT + "\n" +
"error=" + Loader.error);
diff --git a/src/input/plugins/FileInputPlugin.cxx b/src/input/plugins/FileInputPlugin.cxx
index 518de233a..2d2850c74 100644
--- a/src/input/plugins/FileInputPlugin.cxx
+++ b/src/input/plugins/FileInputPlugin.cxx
@@ -65,13 +65,10 @@ OpenFileInputStream(Path path,
throw FormatRuntimeError("Not a regular file: %s",
path.c_str());
-#if !defined(__BIONIC__) || __ANDROID_API__ >= 21
- /* posix_fadvise() requires Android API 21 */
#ifdef POSIX_FADV_SEQUENTIAL
posix_fadvise(reader.GetFD().Get(), (off_t)0, info.GetSize(),
POSIX_FADV_SEQUENTIAL);
#endif
-#endif
return InputStreamPtr(new FileInputStream(path.ToUTF8().c_str(),
std::move(reader), info.GetSize(),
diff --git a/src/system/EPollFD.cxx b/src/system/EPollFD.cxx
index 39ddbca5e..d9200ed41 100644
--- a/src/system/EPollFD.cxx
+++ b/src/system/EPollFD.cxx
@@ -22,21 +22,6 @@
#include "EPollFD.hxx"
#include "FatalError.hxx"
-#if defined(__BIONIC__) && __ANDROID_API__ < 21
-
-#include <sys/syscall.h>
-#include <fcntl.h>
-
-#define EPOLL_CLOEXEC O_CLOEXEC
-
-static inline int
-epoll_create1(int flags)
-{
- return syscall(__NR_epoll_create1, flags);
-}
-
-#endif
-
EPollFD::EPollFD()
:fd(::epoll_create1(EPOLL_CLOEXEC))
{