diff options
author | Martijn Kaijser <mcm.kaijser@gmail.com> | 2015-02-14 16:26:40 +0100 |
---|---|---|
committer | Martijn Kaijser <mcm.kaijser@gmail.com> | 2015-02-15 11:03:34 +0100 |
commit | e2ee1f12392ab9c03e4b908dac8ca627230e2fc7 (patch) | |
tree | 516bb824845df2d9216aa20cb39a41a90826b53f | |
parent | e0103cd85cccdaa878b82404395971adbfbf1c35 (diff) |
[android] bump minimum API version to 17 and set target API to 21. Also remove any API < 17 checks and obsolete OMXLibName.
-rw-r--r-- | tools/android/packaging/xbmc/AndroidManifest.xml.in | 2 | ||||
-rw-r--r-- | xbmc/Application.cpp | 13 | ||||
-rw-r--r-- | xbmc/android/activity/AndroidFeatures.cpp | 20 | ||||
-rw-r--r-- | xbmc/android/activity/AndroidFeatures.h | 1 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 13 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 4 | ||||
-rw-r--r-- | xbmc/settings/SettingConditions.cpp | 3 |
7 files changed, 4 insertions, 52 deletions
diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml.in b/tools/android/packaging/xbmc/AndroidManifest.xml.in index 4232f1a852..f9498739d0 100644 --- a/tools/android/packaging/xbmc/AndroidManifest.xml.in +++ b/tools/android/packaging/xbmc/AndroidManifest.xml.in @@ -6,7 +6,7 @@ android:versionName="@APP_VERSION@" > <!-- This is the platform API where NativeActivity was introduced. --> - <uses-sdk android:minSdkVersion="14" /> + <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="21" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERNET" /> diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 0377bc6531..0f09193b01 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1540,18 +1540,7 @@ bool CApplication::OnSettingUpdate(CSetting* &setting, const char *oldSettingId, } #endif #if defined(TARGET_ANDROID) - if (settingId == "videoplayer.usemediacodec") - { - // Do not permit MediaCodec to be used Android platforms that do not have it. - // The setting will be hidden but the default value is true, - // so change it to false. - if (CAndroidFeatures::GetVersion() < 16) - { - CSettingBool *usemediacodec = (CSettingBool*)setting; - return usemediacodec->SetValue(false); - } - } - else if (settingId == "videoplayer.usestagefright") + if (settingId == "videoplayer.usestagefright") { CSettingBool *usestagefright = (CSettingBool*)setting; return usestagefright->SetValue(false); diff --git a/xbmc/android/activity/AndroidFeatures.cpp b/xbmc/android/activity/AndroidFeatures.cpp index 99f591acb0..7526cd0c81 100644 --- a/xbmc/android/activity/AndroidFeatures.cpp +++ b/xbmc/android/activity/AndroidFeatures.cpp @@ -63,23 +63,3 @@ int CAndroidFeatures::GetVersion() return version; } -std::string CAndroidFeatures::GetLibiomxName() -{ - std::string strOMXLibName; - int version = GetVersion(); - - // Gingerbread - if (version <= 10) - strOMXLibName = "libiomx-10.so"; - // Honeycomb - else if (version <= 13) - strOMXLibName = "libiomx-13.so"; - // IceCreamSandwich - else if (version <= 15) - strOMXLibName = "libiomx-14.so"; - else - strOMXLibName = "unknown"; - - return strOMXLibName; -} - diff --git a/xbmc/android/activity/AndroidFeatures.h b/xbmc/android/activity/AndroidFeatures.h index 3eeb50bc20..9d0c20b8cf 100644 --- a/xbmc/android/activity/AndroidFeatures.h +++ b/xbmc/android/activity/AndroidFeatures.h @@ -27,5 +27,4 @@ class CAndroidFeatures static bool HasNeon(); static int GetVersion(); - static std::string GetLibiomxName(); };
\ No newline at end of file diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp index d7c7ad8090..1dbd2c83ed 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp @@ -167,9 +167,7 @@ public: CBitstreamConverter::write_bits(&bs, 32, 0); // CODEC_HANDLE cntl_handle CBitstreamConverter::write_bits(&bs, 32, 0); // CODEC_HANDLE sub_handle - // added in JellyBean 4.2 - if (CAndroidFeatures::GetVersion() > 16) - CBitstreamConverter::write_bits(&bs, 32, 0); // CODEC_HANDLE audio_utils_handle + CBitstreamConverter::write_bits(&bs, 32, 0); // CODEC_HANDLE audio_utils_handle CBitstreamConverter::write_bits(&bs, 32, p_in->stream_type); // stream_type_t stream_type @@ -194,15 +192,6 @@ public: CBitstreamConverter::write_bits(&bs, 32, 0); // int vbuf_size CBitstreamConverter::write_bits(&bs, 32, 0); // int abuf_size - // ARM requires 8-byte alignment for 64-bit members (ratio64) - // and this will force am_sysinfo to be also have 8-byte alignment. - // Since the inclusion of audio_utils_handle for JellyBean 4.2 - // 'naturally' aligns am_sysinfo to 8-byte, we need to compensate - // when we are NOT JellyBean 4.2. If these member values get changed, - // then make sure you check that am_sysinfo has 8-byte alignment. - if (CAndroidFeatures::GetVersion() < 17) - CBitstreamConverter::write_bits(&bs, 32, 0); - CBitstreamConverter::write_bits(&bs, 32, p_in->format); // am_sysinfo, unsigned int format CBitstreamConverter::write_bits(&bs, 32, p_in->width); // am_sysinfo, unsigned int width CBitstreamConverter::write_bits(&bs, 32, p_in->height); // am_sysinfo, unsigned int height diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp index 015d4bf4b3..2c4bbaffd0 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp @@ -313,10 +313,6 @@ CDVDVideoCodecAndroidMediaCodec::~CDVDVideoCodecAndroidMediaCodec() bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) { - // check for 4.1 Jellybean and above. - if (CAndroidFeatures::GetVersion() < 16) - return false; - // mediacodec crashes with null size. Trap this... if (!hints.width || !hints.height) { diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp index 450b02161a..c313bd0fad 100644 --- a/xbmc/settings/SettingConditions.cpp +++ b/xbmc/settings/SettingConditions.cpp @@ -237,8 +237,7 @@ void CSettingConditions::Initialize() m_simpleConditions.insert("have_libvdpau"); #endif #ifdef TARGET_ANDROID - if (CAndroidFeatures::GetVersion() > 15) - m_simpleConditions.insert("has_mediacodec"); + m_simpleConditions.insert("has_mediacodec"); #endif #ifdef HAS_LIBSTAGEFRIGHT m_simpleConditions.insert("have_libstagefrightdecoder"); |