Kodi allows users to play and view videos, music, podcasts,
and other digital media files from local storage, network storage
diff -Nru kodi-20.0+git20220519.0300-9cda64a5c1/VERSION kodi-20.0+git20220521.0301-43b96fc298/VERSION
--- kodi-20.0+git20220519.0300-9cda64a5c1/VERSION 2013-05-12 08:41:54.000000000 +0000
+++ kodi-20.0+git20220521.0301-43b96fc298/VERSION 2013-05-12 08:41:54.000000000 +0000
@@ -1 +1 @@
-9cda64a5c1
+43b96fc298
diff -Nru kodi-20.0+git20220519.0300-9cda64a5c1/xbmc/platform/android/filesystem/AndroidAppFile.cpp kodi-20.0+git20220521.0301-43b96fc298/xbmc/platform/android/filesystem/AndroidAppFile.cpp
--- kodi-20.0+git20220519.0300-9cda64a5c1/xbmc/platform/android/filesystem/AndroidAppFile.cpp 2013-05-12 08:41:54.000000000 +0000
+++ kodi-20.0+git20220521.0301-43b96fc298/xbmc/platform/android/filesystem/AndroidAppFile.cpp 2013-05-12 08:41:54.000000000 +0000
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -74,6 +75,23 @@
return false;
}
+namespace
+{
+
+CJNIBitmap GetBitmapFromDrawable(CJNIDrawable& drawable)
+{
+ CJNIBitmap bmp = CJNIBitmap::createBitmap(drawable.getIntrinsicWidth(),
+ drawable.getIntrinsicHeight(), CJNIBitmap::ARGB_8888);
+ CJNICanvas canvas(bmp);
+
+ drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+ drawable.draw(canvas);
+
+ return bmp;
+}
+
+} // namespace
+
unsigned int CFileAndroidApp::ReadIcon(unsigned char** lpBuf, unsigned int* width, unsigned int* height)
{
JNIEnv* env = xbmc_jnienv();
@@ -82,6 +100,9 @@
CJNIBitmap bmp;
jclass cBmpDrw = env->FindClass("android/graphics/drawable/BitmapDrawable");
+ jclass cAidDrw = CJNIBase::GetSDKVersion() >= 26
+ ? env->FindClass("android/graphics/drawable/AdaptiveIconDrawable")
+ : nullptr;
if (CJNIBuild::SDK_INT >= 15 && m_icon)
{
@@ -103,6 +124,10 @@
if (resbmp)
bmp = resbmp.getBitmap();
}
+ else if (cAidDrw && env->IsInstanceOf(drw.get_raw(), cAidDrw))
+ {
+ bmp = GetBitmapFromDrawable(drw);
+ }
}
}
}
@@ -122,6 +147,10 @@
if (resbmp)
bmp = resbmp.getBitmap();
}
+ else if (cAidDrw && env->IsInstanceOf(drw.get_raw(), cAidDrw))
+ {
+ bmp = GetBitmapFromDrawable(drw);
+ }
}
}
if (!bmp)
diff -Nru kodi-20.0+git20220519.0300-9cda64a5c1/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp kodi-20.0+git20220521.0301-43b96fc298/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp
--- kodi-20.0+git20220519.0300-9cda64a5c1/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp 2013-05-12 08:41:54.000000000 +0000
+++ kodi-20.0+git20220521.0301-43b96fc298/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp 2013-05-12 08:41:54.000000000 +0000
@@ -132,12 +132,15 @@
if (IsHdmiModeTriggered())
SetHdmiState(true);
- // Ignore EGL_BAD_SURFACE: It seems to happen during/after mode changes, but
- // we can't actually do anything about it
- if (rendered && !m_pGLContext.TrySwapBuffers())
- CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
-
- CXBMCApp::Get().WaitVSync(1000);
+ if (rendered)
+ {
+ // Ignore EGL_BAD_SURFACE: It seems to happen during/after mode changes, but
+ // we can't actually do anything about it
+ if (m_pGLContext.TrySwapBuffers())
+ CXBMCApp::Get().WaitVSync(1000);
+ else
+ CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
+ }
}
float CWinSystemAndroidGLESContext::GetFrameLatencyAdjustment()