ifdef and comment out libjpeg
Chances are there are not many themes in widespread use that are
using jpeg images, but this will be easy to revert back or even
just temporarily modify if we need jpeg support in a pinch.
Change-Id: If17b05ce3ebccce724fd74b26ed8ea91b287c3cf
diff --git a/gui/theme/landscape_hdpi/splash.xml b/gui/theme/landscape_hdpi/splash.xml
index 1a9fd53..cbadcde 100755
--- a/gui/theme/landscape_hdpi/splash.xml
+++ b/gui/theme/landscape_hdpi/splash.xml
@@ -4,8 +4,7 @@
<resolution width="1920" height="1200"/>
<author>TeamWin</author>
<title>TWRP</title>
- <description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <description>splash screen</description>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/landscape_hdpi/ui.xml b/gui/theme/landscape_hdpi/ui.xml
index 1246b75..2e26352 100644
--- a/gui/theme/landscape_hdpi/ui.xml
+++ b/gui/theme/landscape_hdpi/ui.xml
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/landscape_mdpi/splash.xml b/gui/theme/landscape_mdpi/splash.xml
index 34f8325..d4f16fc 100755
--- a/gui/theme/landscape_mdpi/splash.xml
+++ b/gui/theme/landscape_mdpi/splash.xml
@@ -4,8 +4,7 @@
<resolution width="800" height="480"/>
<author>TeamWin</author>
<title>TWRP</title>
- <description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <description>splash screen</description>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/landscape_mdpi/ui.xml b/gui/theme/landscape_mdpi/ui.xml
index 3c4c783..8b63dcb 100644
--- a/gui/theme/landscape_mdpi/ui.xml
+++ b/gui/theme/landscape_mdpi/ui.xml
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/portrait_hdpi/splash.xml b/gui/theme/portrait_hdpi/splash.xml
index 964b2af..02717e2 100755
--- a/gui/theme/portrait_hdpi/splash.xml
+++ b/gui/theme/portrait_hdpi/splash.xml
@@ -4,8 +4,7 @@
<resolution width="1080" height="1920"/>
<author>TeamWin</author>
<title>TWRP</title>
- <description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <description>splash screen</description>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/portrait_hdpi/ui.xml b/gui/theme/portrait_hdpi/ui.xml
index 18385ad..5fc8cd2 100644
--- a/gui/theme/portrait_hdpi/ui.xml
+++ b/gui/theme/portrait_hdpi/ui.xml
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/portrait_mdpi/splash.xml b/gui/theme/portrait_mdpi/splash.xml
index 31f7933..dad53cc 100755
--- a/gui/theme/portrait_mdpi/splash.xml
+++ b/gui/theme/portrait_mdpi/splash.xml
@@ -4,8 +4,7 @@
<resolution width="480" height="800"/>
<author>TeamWin</author>
<title>TWRP</title>
- <description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <description>splash screen</description>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/portrait_mdpi/ui.xml b/gui/theme/portrait_mdpi/ui.xml
index 4d002ff..5ac6b95 100644
--- a/gui/theme/portrait_mdpi/ui.xml
+++ b/gui/theme/portrait_mdpi/ui.xml
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/watch_mdpi/splash.xml b/gui/theme/watch_mdpi/splash.xml
index 81bef45..ff9bc98 100755
--- a/gui/theme/watch_mdpi/splash.xml
+++ b/gui/theme/watch_mdpi/splash.xml
@@ -4,8 +4,7 @@
<resolution width="320" height="320"/>
<author>TeamWin</author>
<title>TWRP</title>
- <description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <description>splash screen</description>
<themeversion>1</themeversion>
</details>
diff --git a/gui/theme/watch_mdpi/ui.xml b/gui/theme/watch_mdpi/ui.xml
index bad23c0..c56610b 100644
--- a/gui/theme/watch_mdpi/ui.xml
+++ b/gui/theme/watch_mdpi/ui.xml
@@ -6,7 +6,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
- <preview>preview.jpg</preview>
+ <preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 39c61c4..ac4c181 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -55,10 +55,11 @@
external/libpng \
external/zlib \
system/core/include \
- external/jpeg \
external/freetype/include \
external/libcxx/include
+#external/jpeg \
+
ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
endif
@@ -151,7 +152,8 @@
LOCAL_CLANG := true
LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
-LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libjpeg libpng libutils
+LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils
+#libjpeg
LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := libminuitwrp
diff --git a/minuitwrp/resources.cpp b/minuitwrp/resources.cpp
index 781df2b..c4325e4 100644
--- a/minuitwrp/resources.cpp
+++ b/minuitwrp/resources.cpp
@@ -31,9 +31,11 @@
#include <png.h>
#include <pixelflinger/pixelflinger.h>
+#ifdef TW_INCLUDE_JPEG
extern "C" {
#include "jpeglib.h"
}
+#endif
#include "minui.h"
#define SURFACE_DATA_ALIGNMENT 8
@@ -251,6 +253,7 @@
return result;
}
+#ifdef TW_INCLUDE_JPEG
int res_create_surface_jpg(const char* name, gr_surface* pSurface) {
GGLSurface* surface = NULL;
int result = 0, y;
@@ -348,18 +351,23 @@
}
return result;
}
+#endif
int res_create_surface(const char* name, gr_surface* pSurface) {
int ret;
if (!name) return -1;
+#ifdef TW_INCLUDE_JPEG
if (strlen(name) > 4 && strcmp(name + strlen(name) - 4, ".jpg") == 0)
return res_create_surface_jpg(name,pSurface);
+#endif
ret = res_create_surface_png(name,pSurface);
+#ifdef TW_INCLUDE_JPEG
if (ret < 0)
ret = res_create_surface_jpg(name,pSurface);
+#endif
return ret;
}
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 825b990..e22883c 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -122,7 +122,7 @@
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
endif
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
-RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
+#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
ifeq ($(TWHAVE_SELINUX), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)