diff --git a/gui/Android.mk b/gui/Android.mk
index 58d9c4ba..9e11e5e2 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -19,7 +19,9 @@ LOCAL_SRC_FILES := \
slider.cpp \
listbox.cpp \
keyboard.cpp \
- input.cpp
+ input.cpp \
+ blanktimer.cpp \
+ ../minuitwrp/graphics.c
ifneq ($(TWRP_CUSTOM_KEYBOARD),)
LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD)
@@ -46,6 +48,9 @@ endif
ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
endif
+ifneq ($(TW_BRIGHTNESS_PATH),)
+ LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH)
+endif
LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)
diff --git a/gui/action.cpp b/gui/action.cpp
index e56db2b7..f1dac1c9 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -24,6 +24,7 @@
#include "../ui.h"
#include "../adb_install.h"
+#include "blanktimer.hpp"
extern "C" {
#include "../common.h"
@@ -44,6 +45,7 @@ int gui_start();
#include "objects.hpp"
extern RecoveryUI* ui;
+extern blanktimer blankTimer;
void curtainClose(void);
@@ -323,6 +325,7 @@ void GUIAction::operation_end(const int operation_status, const int simulate)
}
DataManager::SetValue("tw_operation_state", 1);
DataManager::SetValue(TW_ACTION_BUSY, 0);
+ blankTimer.resetTimerAndUnblank();
}
int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
new file mode 100644
index 00000000..f64bb5f4
--- /dev/null
+++ b/gui/blanktimer.cpp
@@ -0,0 +1,128 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy TeamWin
+ This file is part of TWRP/TeamWin Recovery Project.
+
+ TWRP is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ TWRP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TWRP. If not, see .
+*/
+
+using namespace std;
+#include "rapidxml.hpp"
+using namespace rapidxml;
+extern "C" {
+#include "../minzip/Zip.h"
+#include "../minuitwrp/minui.h"
+}
+#include
+#include
+#include