Camera button support: useful features & bugfixes (1/2)

Screw the remapping, let's make something more useful!
Replaced the code to actually launch Camera app, not just fire the shutter.
I won't remove it: it's cool to have an option to double-click Home for Camera.
Added:
  * Camera wake (with button half-press) and unlock options
  * "Peek": releasing the half-pressed Camera button will
    turn the screen back off
  * Camera playback control

Change-Id: Id49e09e20d81cd80d9800ab8ab0f200d44485a09
Fix stencil buffer bug.

Stencil test is enabled by setStencilFromClip(), but not disabled
in some use case, which causes some of the pixels are discarded by
mistake in draws followed. Disable stencil test when there is no
dirty clip.

CRs-Fixed: 539456

Change-Id: I318fb47212e49e2da89bcbfd161a1689ef91b02f
Wifi: wifi not connecting, once the APN gets disabled state

APNs are disabled on select network and they are enabled on
receiving connected event.
But forgetting an APN before the connected event is received,
will result all the remaining APN to be in disabled state and
they never connect.
So, Enabling all the disabled APN on forget network will help
to connect automatically to a saved APN.

Change-Id: I6ac5e9856d6ec0b72c089b159206abd2de98e6a3
CRs-fixed: 496165
Statusbar: Show wifi icon on wifi enabled

Currently wifi icon is shown on status bar only when device is connected
to an AP but not just when wifi is enabled.

Add support to show wifi icon on enable even with no wifi connection.

Change-Id: I23a8c99147236d75180b04cbada0f8f087235e1c
Icons from KitKat

PS2: use all drawables from KitKat
PS3: whiten out some toggles and few other icons (xdhpi only)
PS4: revert custom toggles that I did in PS3
PS5: add core/res/res drawables also
PS6: icon derp

Change-Id: Ie37c73ea6840791169eece12ee42f6d41c91360c
fix regular font derp

Change-Id: Ib7c195d9195a5652964afac78aa348a240e18a7c
Active Display: Add always show pocket mode. [1/2]

Currently pocket mode is either on or off and when no
notifications are available it doesn't turn on.  This
adds an option to allow active display to come on even
when no notifications are available, showing the time
and allowing the user to unlock the device.

PS2:
Add unlock icon to center of the ring.

AICP:
PS2: fix build

Change-Id: I14043256e0202b497c0e9f3c64aa796c1b2becac
Network stats: use number formating based on android code

Uses logic from Formatter.formatFileSize

Change-Id: I9008df0e90fbaf8d733cfd853dc1ef6160cf67f5
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Revert "Active Display: Add always show pocket mode. [1/2]"

This reverts commit 56e7dea99c3b75fcc1092e88b605f0b12c69c0c5.

Change-Id: Ied9e8aca66ae10ccac2f10e6cb61c17aa7732c8f
Merge "Revert "Active Display: Add always show pocket mode. [1/2]"" into jb-mr2
Merge branch 'jb-mr2' of https://github.com/AICP/frameworks_base into jb-mr2