Hide install icon after success as it is done for regular zip installs

Change-Id: I932a6ecff0fb64913842c1ea4624021b476f7d46
Nandroid menu fixes:
- fix memory overflow bug if vold managed volumes reach MAX_NUM_MANAGED_VOLUMES.
- easier editing: this completes previous two commits to clean up Install Zip menu and Advanced menu

Change-Id: I349cc7b04878b92d902e1ee826d9b4c5bc77cf83
(cherry picked from commit a88b701ccb0733ca5cdd51490b86707c8d19a1f4)
Free up memory from file menu pointers

* Cleanup sub-filemenu pointers after their results are copied.
* Cleanup file pointers after all operations have been performed on
the file.

Change-Id: Ie6c482c5ffddd7ebebdc99bbe8ae856e53e1405f
(cherry picked from commit 5360b52dba6b120b6e0ba5c775e2a961504a34a3)
Do not modify original items pointer when filtering NULL entries

get_filtered_menu_selection currently modifies the items menu passed
to it. This can be problematic if the items menu is needed later without
any filtering of NULL entries. Instead, let's modify a copy of the items
menu, leaving the original intact.

Change-Id: Ief6f538441ea78fcd8eba3a815354f06bda849a0
Loki updates:

* update to v2.1 + sync to latest sources
* fix broken LG devices + add new ones
* proper code for recovery
* do not lokify after a failed adb install
* use original loki format sources for easier future updates
* fix all compiler warnings

Change-Id: I4f19edc492a1105c2b91c579f295876a4dc313b2
recovery: Fix the configuration of default_backup_format

I believe that this was missed (and therefore broken) in this commit:

commit a46e1bd7b32dc3ab660518a1aeab2f99d1ec518b
Author: philz-cwm6 <phytowardt@gmail.com>
Date:   Sun Dec 1 22:26:45 2013 +0100

    Define paths for recovery settings files in a separate header

    Also, use get_primary_storage_path() to define the locations of .no_conf
    .many_confirm, and .hidenandroidprogress instead of hard-coding /sdcard/

    Change-Id: I50442a226af1d102786c833c0b53c25bf63c67a6
    (cherry picked from commit bd0fe453f6ca242f0ed868b4c0934af29d499bba)

Change-Id: Idee6d712ac55cdd4b2690011a48226af2ed20d96
Clean up c formatting - 1

There are several inconsistent coding styles in CWM source from years of
contributions. I tried to find parameters for 'indent' which change the
least amount of code but outputs a style most will feel at home with.

Most of these formatting changes come from:
indent -br -brf -brs -cdw -ce -i4 -l160 -nbap -nbc -nbfda -ncs -npcs \
 -npsl -nut -ts4 file.c

Some manual modifications after running indent:
1) a()? b : c    --->    a() ? b : c
2) retain existing pointer definition styles
3) indentation of structs
4) change { } wrapping of cases in switch statements

Change-Id: I7f34a2e769a9a3f397ad36b8e25676424780aa00
su: Update for latest su daemon compatibility

Change-Id: I6d2f36d9f01d7bc6004724458875b3dce850d00e
Merge "Clean up c formatting - 1" into cm-11.0
minui: do not use flexible array initialization

Avoiding the use of gnu extensions improves code portability

Change-Id: I441a49ce08b6ecb1d735ca453552fa92026c5016
Remove "Go Back" option from verify root and recovery options

These options only show when you are exiting recovery and there
is no where to "go back" to.

Patchset 1) initial
Patchset 2) change to ui_set_showing_back_button()
Patchset 3) revert settings before returning

Change-Id: I0aee8d0fbce9a5ff415b74b4a16e0d416042e307
Merge "Remove "Go Back" option from verify root and recovery options" into cm-11.0
do not use static type

Change-Id: I7baff2106a98d5246ea2ad619670dcb5575afeab
remove unused variable

Change-Id: Idb89503140a6a3385fe17990e3484fe71883885f
do not error on missing sd-ext when wiping dalvik cache

Change-Id: I4cf817f05bd708fe2b7d6a5f20aab6ef2413d117
Fix potential chmod failures

1) ensure_directory: only chmod if directory exists or is created
2) nandroid_backup: if the backup is stored on a different volume than
/sdcard, then these chmod commands will fail. Correct the backup paths.

Change-Id: Ia54c27fdf861c90a4de86346893f334420060090
Add a copy of the updater binary to the recovery resources

* We may need to force the use of a compatible binary if the one
in the update package is suspected to be bad

Change-Id: I71505de51a9600c08ccfe8639385a7b2f2bfe2a2
install: Support downgrade scenarios

Android 4.4 changed the in-RAM format of the property data, making
update binaries built with older versions unable to read it. This
makes any attempt to read a property return empty, and fail any
prop-related assertions.

If we identify an attempt to run a binary that has a common pre-4.4
edify command ("set_perm_recursive") but not one of the new ones
("set_metadata_recursive"), assume it's a pre-4.4 binary and replace
it with a builtin fallback

Change-Id: Ic483c816d772c32266585b669f59c66e77afcebb
install: Fix possible overflow condition in the updater "scanner"

Don't just reset the position pointer after a failure, reset it
after a successful match too, to prevent a followup loop from poking
beyond the limit of the match arrays. (if matchmeta is hit before
matchperm)

Change-Id: I7842798597eb1aee79b4c770f1eeca131020483d
Merge "minui: do not use flexible array initialization" into cm-11.0