VanirActions: Flush memory

Triggerable by touching memory tile

todo: add clear all apps to the function
      possibly hack an OOM event by
      dd if=/dev/zero of=junk bs=10MB count=200
      with the purpose of forcing memory lost from
      leaks to be returned (sooo dirty)

PS2: added icon to forgotten resolutions. opted for ; instead
     of && so any commands down the chain will still run if stopped.
     added pkill to systemUI.

PS3: fix icon. reformat scripting. reformat helper class to use string array in a loop instead of
     using cmdprocessor to exec a massive one-liner. change string name. test finalization and
     garbage collection. some minor cleanup.

PS4: fix potential issue with loop

PS5: run on separate thread than UI & clean up script. done.

PS11: Make use of existing shell script helper, CMDProcessor
      Don't remount /data rw, because it's already rw
      Restore previous drop_cache value after fiddling with it

PS12: Fix restoration

PS13: Clean imports

PS14: Do flushing in FlushMemory.java instead of helpers, and wait until AFTER gc/finalize before restoring drop_cache value
      use static final TAG for logging, and make execFlush private

PS15: correct return type

PS16: add missing declaration... herpderp

PS17: add DoubleTap helper to manhandle activity lifecycle.

PS18: more mutual exclusion for lifecycle manhandling, and make a few things global to prevent them getting killed when onResume returns

PS19: Made flushing synchronous so it finishes.
      Import sanatization.
      Display stdout and stderror for commands that fail.

PS20: Add toString() to CommandResult, and use IT instead of EasyPair

PS21: Remove redundant drop_cache writing
      Don't restart SystemUI
      Add click for memory tile that causes a flush

PS22: Make touch handler synchronous (hopefully to make it actually happen)
      Toast
      Optipng

PS29: Fix the dodo i did with my last PS

Change-Id: I09ff06d748b79911367a6f12814255a46eef3ebf
FIX the lockscreen auto-unlocking for lockscreen-launched activities.

Revert "Don't start keyguard in an attempt to exit it."

This reverts commit c996bc4a2fedb3680587dda5e9c8da93e51f03f8.

Change-Id: I4bf70d2dd99b4c89e0c7d8e2130004a95358dd66
Merge "VanirActions: Flush memory" into jb42
WIP - HALO (1/2)

ps2: optipng

HALO is Androids one and only multitasking solution.

We explicitly do not go the Samsung/Cornerstone route. This solution is basically an extension of
the regular notificationshade, which is an aggregator for notifications that can be checked out when
time permits. HALO completes it by allowing you to respond to tasks on the spot, trying to be as
unintrusive as possible and flexible in regards to policies (white/black lists).

Features:

- Apps open up in floating state, apps underneath do not pause
- complete SystemUI & Core integration, making HALO feel like a native feature, source/SDK and UI/UX
- HALO has white and blacklists, which for now allow fine control for apps pinging through HALO
- multiple gestures to navigate HALO:
  - double-tap-move: move
  - tap-drag-left/right: task through notifications, finger up launches
  - tap-drag-up: dismiss notification
  - tap-drag-down: put HALO into semi-hidden state
  - swipe while HALO is hidden wakes it up
  - drag-to-X to remove HALO altogether
- comes with as few settings as possible, everything should be self explanatory and intutive,
  users must be informed about the double-tap gestures which is the only catch.

Known issues:

- Integration has been finished for PhoneUI. TabletUI and PIE must be integrated still.
- Packageinstaller must allow HALO through its overlay check or it will disable the install-app button.
- The low level has a few remaining issues:
  - Some apps still go up fullscale (they trick us with services, circumventing the intent flagging)
  - Some 3D games still pause
  - There is one known app that refuses to end on back or touch-outside, that is WeChat
  - The activitystack pause implementation works but is makeshift

To-Do:

- On-screen tutorial at first start up to teach users the gestures
- Fixing all known issues, full integration in the remaining UI's
- Perhaps hybrid engine integration for running floating apps in a decreased size

Merge branch 'multiwindow' into jellybean

Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	core/java/android/app/Activity.java
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Change-Id: I560d2274ba2b6f2f9acee0ade88ecfc5f51c1de1
Merge branch 'master' into HEAD