summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-12-19 18:27:16 +0100
committerGerrit Code Review <gerrit2@gerrit>2013-12-19 18:27:16 +0100
commit4d132cabf4d335f694189ec3e32e59e123e4a6db (patch)
tree18ce1043100a4b7c04c97edf6ec120dace8b2d83
parentMerge "add fix /data/data contexts to fixPermissions only compile symbols if selinux is defined Change-Id: I7c8596360cdf2f715c8e1379fc55ea27d9370393" into android-4.4 (diff)
parentAdd support for persistent variables in theme's <variables> section (diff)
downloadandroid_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar.gz
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar.bz2
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar.lz
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar.xz
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.tar.zst
android_bootable_recovery-4d132cabf4d335f694189ec3e32e59e123e4a6db.zip
Diffstat (limited to '')
-rw-r--r--gui/pages.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index d02dd216d..d662f18f8 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -611,16 +611,21 @@ Page* PageSet::FindPage(std::string name)
int PageSet::LoadVariables(xml_node<>* vars)
{
xml_node<>* child;
+ xml_attribute<> *name, *value, *persist;
+ int p;
child = vars->first_node("variable");
while (child)
{
- if (!child->first_attribute("name"))
- break;
- if (!child->first_attribute("value"))
- break;
+ name = child->first_attribute("name");
+ value = child->first_attribute("value");
+ persist = child->first_attribute("persist");
+ if(name && value)
+ {
+ p = persist ? atoi(persist->value()) : 0;
+ DataManager::SetValue(name->value(), value->value(), p);
+ }
- DataManager::SetValue(child->first_attribute("name")->value(), child->first_attribute("value")->value());
child = child->next_sibling("variable");
}
return 0;