summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gui/Android.mk3
-rw-r--r--gui/blanktimer.cpp7
-rw-r--r--gui/gui.cpp4
-rw-r--r--gui/objects.hpp4
-rw-r--r--gui/pages.hpp6
-rw-r--r--gui/resources.hpp6
6 files changed, 29 insertions, 1 deletions
diff --git a/gui/Android.mk b/gui/Android.mk
index 18decd047..db7769d9b 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -64,6 +64,9 @@ endif
ifneq ($(TW_NO_SCREEN_TIMEOUT),)
LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT
endif
+ifeq ($(HAVE_SELINUX), true)
+LOCAL_CFLAGS += -DHAVE_SELINUX
+endif
LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
index a513ff057..833305395 100644
--- a/gui/blanktimer.cpp
+++ b/gui/blanktimer.cpp
@@ -20,7 +20,6 @@ using namespace std;
#include "rapidxml.hpp"
using namespace rapidxml;
extern "C" {
-#include "../minzip/Zip.h"
#include "../minuitwrp/minui.h"
}
#include <string>
@@ -37,9 +36,15 @@ extern "C" {
#include <sstream>
#include "pages.hpp"
#include "blanktimer.hpp"
+#include "objects.hpp"
#include "../data.hpp"
extern "C" {
#include "../twcommon.h"
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
}
#include "../twrp-functions.hpp"
#include "../variables.h"
diff --git a/gui/gui.cpp b/gui/gui.cpp
index 6ee29d57b..8329827e3 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -37,7 +37,11 @@ extern "C"
{
#include "../twcommon.h"
#include "../minuitwrp/minui.h"
+#ifdef HAVE_SELINUX
#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
#include <pixelflinger/pixelflinger.h>
}
diff --git a/gui/objects.hpp b/gui/objects.hpp
index 8f6f9bbf6..d37b43e3b 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -26,7 +26,11 @@
#include <map>
extern "C" {
+#ifdef HAVE_SELINUX
#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
}
using namespace rapidxml;
diff --git a/gui/pages.hpp b/gui/pages.hpp
index c308c1a5c..a37cdb9f2 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -3,6 +3,12 @@
#ifndef _PAGES_HEADER_HPP
#define _PAGES_HEADER_HPP
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+
typedef struct {
unsigned char red;
unsigned char green;
diff --git a/gui/resources.hpp b/gui/resources.hpp
index 4e05e4186..339e03ade 100644
--- a/gui/resources.hpp
+++ b/gui/resources.hpp
@@ -3,6 +3,12 @@
#ifndef _RESOURCE_HEADER
#define _RESOURCE_HEADER
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+
// Base Objects
class Resource
{