summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/Android.mk16
-rw-r--r--gui/action.cpp1
-rw-r--r--gui/button.cpp14
3 files changed, 26 insertions, 5 deletions
diff --git a/gui/Android.mk b/gui/Android.mk
index db7769d9b..ac0b2037c 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -68,6 +68,22 @@ ifeq ($(HAVE_SELINUX), true)
LOCAL_CFLAGS += -DHAVE_SELINUX
endif
+ifeq ($(DEVICE_RESOLUTION),)
+$(warning ********************************************************************************)
+$(warning * DEVICE_RESOLUTION is NOT SET in BoardConfig.mk )
+$(warning * Please see http://tinyw.in/nP7d for details )
+$(warning ********************************************************************************)
+$(error stopping)
+endif
+
+ifeq "$(wildcard bootable/recovery/gui/devices/$(DEVICE_RESOLUTION))" ""
+$(warning ********************************************************************************)
+$(warning * DEVICE_RESOLUTION ($(DEVICE_RESOLUTION)) does NOT EXIST in bootable/recovery/gui/devices )
+$(warning * Please choose an existing theme or create a new one for your device )
+$(warning ********************************************************************************)
+$(error stopping)
+endif
+
LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)
include $(BUILD_STATIC_LIBRARY)
diff --git a/gui/action.cpp b/gui/action.cpp
index 32adb8432..5536c82b1 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1195,6 +1195,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
} else {
ret = 1; // failure
}
+ PartitionManager.Update_System_Details();
if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
operation_start("ReinjectTWRP");
gui_print("Injecting TWRP into boot image...\n");
diff --git a/gui/button.cpp b/gui/button.cpp
index 3f9c2df1f..be52c277e 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -58,15 +58,19 @@ GUIButton::GUIButton(xml_node<>* node)
if (!node) return;
- // Three of the four can be loaded directly from the node
- mButtonImg = new GUIImage(node);
+ // These can be loaded directly from the node
mButtonLabel = new GUIText(node);
mAction = new GUIAction(node);
- if (mButtonImg->Render() < 0)
+ child = node->first_node("image");
+ if (child)
{
- delete mButtonImg;
- mButtonImg = NULL;
+ mButtonImg = new GUIImage(node);
+ if (mButtonImg->Render() < 0)
+ {
+ delete mButtonImg;
+ mButtonImg = NULL;
+ }
}
if (mButtonLabel->Render() < 0)
{