diff options
author | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 20:53:02 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 20:53:02 +0200 |
commit | 2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21 (patch) | |
tree | a176f540fd6b31ea626df0d267284526180e4f93 | |
parent | Fix permissions updates (diff) | |
download | android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar.gz android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar.bz2 android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar.lz android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar.xz android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.tar.zst android_bootable_recovery-2ff5a8dc5b7c39a21eb1bc8d2d227f2b16800a21.zip |
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 2 | ||||
-rwxr-xr-x | gui/devices/1024x600/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/1024x768/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/1280x800/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/1920x1200/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/320x480/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/480x800/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/480x854/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/540x960/res/ui.xml | 18 | ||||
-rw-r--r-- | gui/devices/720x1280/res/ui.xml | 18 | ||||
-rwxr-xr-x | gui/devices/800x1280/res/ui.xml | 18 | ||||
-rwxr-xr-x | gui/devices/800x480/res/ui.xml | 18 | ||||
-rw-r--r-- | partitionmanager.cpp | 20 | ||||
-rw-r--r-- | partitions.hpp | 1 |
14 files changed, 221 insertions, 0 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 1132a20a9..d63693440 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -715,6 +715,8 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) DataManager::GetValue(TW_EXTERNAL_PATH, External_Path); ret_val = PartitionManager.Wipe_By_Path(External_Path); + } else if (arg == "ANDROIDSECURE") { + ret_val = PartitionManager.Wipe_Android_Secure(); } else ret_val = PartitionManager.Wipe_By_Path(arg); diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index f32092646..7a0bbd00d 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -1583,6 +1583,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col4_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index 02f0e1c80..cc9701ba1 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -1583,6 +1583,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col4_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index 94df418d2..2e5b32905 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -1583,6 +1583,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col4_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index a3eb3f933..17ccfe922 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -1583,6 +1583,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col4_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index bcc021133..efa980ac4 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -1163,6 +1163,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index 729b0c26c..435efb079 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -1162,6 +1162,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index d44d28c7a..ff0035723 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -1161,6 +1161,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index d673bc0c4..ca008d5ab 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -1162,6 +1162,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index dade88206..d0973b2ef 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -1167,6 +1167,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index 0ca35eb66..b7c1e0429 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -1163,6 +1163,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index e3ac81688..4454ffefb 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -1583,6 +1583,24 @@ </object> <object type="button"> + <condition var1="tw_has_data_media" var2="0" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Android Secure</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=wipe</action> + <action function="set">tw_action=wipe</action> + <action function="set">tw_action_param=ANDROIDSECURE</action> + <action function="set">tw_text1=Wipe Android Secure?</action> + <action function="set">tw_action_text1=Wiping Android Secure...</action> + <action function="set">tw_complete_text1=Wipe Android Secure Complete</action> + <action function="set">tw_slider_text=Swipe to Format</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> <condition var1="tw_has_sdext_partition" var2="1" /> <placement x="%col4_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> diff --git a/partitionmanager.cpp b/partitionmanager.cpp index c99447ff0..98151b43c 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1283,6 +1283,26 @@ int TWPartitionManager::Wipe_Battery_Stats(void) { return true; } +int TWPartitionManager::Wipe_Android_Secure(void) { + std::vector<TWPartition*>::iterator iter; + int ret = false; + bool found = false; + + // Iterate through all partitions + for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { + if ((*iter)->Has_Android_Secure) { + ret = (*iter)->Wipe_AndSec(); + found = true; + } + } + if (found) { + return ret; + } else { + LOGE("No android secure partitions found.\n"); + } + return false; +} + int TWPartitionManager::Format_Data(void) { TWPartition* dat = Find_Partition_By_Path("/data"); diff --git a/partitions.hpp b/partitions.hpp index 9a700b804..fdceba844 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -172,6 +172,7 @@ public: virtual int Wipe_Dalvik_Cache(); // Wipes dalvik cache virtual int Wipe_Rotate_Data(); // Wipes rotation data -- virtual int Wipe_Battery_Stats(); // Wipe battery stats -- /data/system/batterystats.bin + virtual int Wipe_Android_Secure(); // Wipes android secure virtual int Format_Data(); // Really formats data on /data/media devices -- also removes encryption virtual int Wipe_Media_From_Data(); // Removes and recreates the media folder on /data/media devices virtual void Refresh_Sizes(); // Refreshes size data of partitions |