Quickly install from last install path

This patch stores the last path a zip was installed
from and adds a menu option to jump there quickly
when installing new zips.

Patchset 1) initial commit
Patchset 2) remove un-need call to dirname()
            increase install_menu_items[] size
Patchset 3) removed use of stat
            more install_menu_items[] changes
Patchset 4) removed unused variable info
Patchset 5) removed unused variables
            general clean up

Change-Id: I02d2fde26b375fad36dbab50ec2a8b8a52afc003
unmount /data on user request for /data/media devices

Change-Id: I86723215edb8c5d256bdd380ff1806729aa81a8f
install zip menu fixes:
    * fix memory overflow if num_extra_volumes = MAX_NUM_MANAGED_VOLUMES
    * simpler to manage install zip menu
    * better ordered listing of volume storage paths

Change-Id: I11d8f76bfe4a60623842810b7bdddd18e5cb99f9
clean up reboot to main system and remove old useless variables

Change-Id: Idf8cda0639e3fa5e6073b196a85899c57ca18e9b
Swipe: make swipe thresholds uniform across devices

Devices with high screen densities require very small swipes to activate
a key. Make the swipe distance uniform across devices by using the screen
density from ro.sf.lcd_density and activating a key based on the following
thresholds:
  Left/Right swipe: 0.5in
  Up/Down swipe: 0.3in

Change-Id: I39fe4b1007a4e4784d3d7d26a392d78b1adf9462
6.0.4.5

Change-Id: I4c67db56928243aa75db950c70ad80483a133fec
Merge "Quickly install from last install path" into cm-11.0
Merge "unmount /data on user request for /data/media devices" into cm-11.0
Merge "install zip menu fixes:     * fix memory overflow if num_extra_volumes = MAX_NUM_MANAGED_VOLUMES     * simpler to manage install zip menu     * better ordered listing of volume storage paths" into cm-11.0
Merge "clean up reboot to main system and remove old useless variables" into cm-11.0
Merge "Swipe: make swipe thresholds uniform across devices" into cm-11.0
Don't return immediately from reboot commands.

The reboot commands return too fast, interfering with testing.
Add a pause(), which will allow the device time to complete the
reboot.

Change-Id: Ie9cc6eea67b7ff662ec71ea2329cbb94f8d55404
Bug: 11369303
Enable incremental builder to find files that moved, and
try to process them via patch + rename, instead of
delete + add.

b/11437930

Change-Id: I984349fbc9a8dac4379e00c0d66fc7d22c4eb834
Support recoveries without CONFIG_EXT4_FS_XATTR

If for some reason the recovery's kernel can't be replaced and has
no support for xattrs, use this. Chances are the system will break
unless you know what you're doing and compensate on the Android side

Change-Id: I09ff2cbd0ae68ec4f4b2a2e26acb6b0bc8b3569a
Remove redundant variable definition

The same Volume variable is defined with two names in the same scope.
Merge the names and remove one of the definitions.

Change-Id: I021697b42791bc6323c5fa0d9704d27ecfe2c8c1
(cherry picked from commit d98fabe2aa8df0e421a69130c1d787705209682d)
Do data/media checks first in format_device()

Wait to define a Volume variable until data/media checks are done
in case the Volume definition is unnecessary.

Change-Id: I6912b1b2a473ea8737ea3e415e9a0172bb35eff1
(cherry picked from commit dd812777f0bbb7075da8c3da6a18612fa90e100e)
Merge "Remove redundant variable definition" into cm-11.0
recovery: Add support for performance control

 * Recovery will now set "recovery.perf.mode" to 1 before a
   backup/restore operation begins, and will set it back to 0
   when the operation is complete. It will also do this during
   package installations.
 * This allows devices to boot into recovery in a low-power mode,
   and bring up more cores and adjust other settings. Pigz is
   multithreaded, and enabling all cores vastly improves performance of
   compressed backups.
 * Device maintainers who wish to use this should configure their
   init.recovery script to trigger off of this property.

Change-Id: I174e45215ad1cd34a34b1af4486a64fb6e54134b
Define paths for recovery settings files in a separate header

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

Change-Id: I50442a226af1d102786c833c0b53c25bf63c67a6
(cherry picked from commit bd0fe453f6ca242f0ed868b4c0934af29d499bba)
Bump recovery to 6.0.4.6

Change-Id: Id2b373e5a356e7eaa8694e5d0300dff860762061