HeadsUp: Fix dismiss on back key press.

Change-Id: Ia213aeba114d153f5561622a2bea884963f3d8a1
(cherry picked from commit d84e336fdcf5db5ab7116297732c316416845e3d)
add framework torch service

Change-Id: I0c7a055b33fdebe697f23d207b20408e06eb74a8
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit 47efe1dc56fe5ac81bd668c6e44e29f5b4d74e5d)
Fully fix interaction between torch and camera usage.

For doing this, two things are necessary:
- The torch shutdown needs to be synchronous, so that the torch app has
  a chance to release the camera before the camera app tries to use it.
- The torch service needs to track camera usage, so that it can notify
  the torch app if a camera is busy.

Change-Id: I521091d255ff4c251d97a0e8d65c9d2a80b9dae4
frameworks: move safe volume warning above expanded volume panel

Fixes JIRA bug BACON-50

Change-Id: I1bc7c4781aa81cccd42281f70b394b7f7d81d3e5
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit a55aa1ac385c3549d255b5d474c85c7c001f32e0)
SystemUI: improve one finger notification expansion

Fixes JIRA bug BACON-70.

Sometimes the quick settings ribbon would eat the initial ACTION_DOWN
setting mInitialTouchY in the expand helper, but we are clearly not in a
notification that we can expand here. So only set the initial y point if
we are inside the notification scrollview.

Change-Id: I628553ac15cc6b4ee3c682fe46bd1d96c6bc154d
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit 9584ba5532da9b5163397917de94109aa2fb35e3)
SystemUI: fix double tap to sleep not working with secure lock screen

Double tap to sleep on status bar would only work on secure lockscreens if the
slider brightness control was enabled.

Change-Id: I7c4dc5b2f559aafae819422d747f92ac59631ffd
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit c7a4aa9233b473a6e4326070624b196f52fa27ec)
settings: Fix loading of some initial values

Change-Id: I41658dd8dc3f31b4463ae4d4f3cd6f480a0ccba3
(cherry picked from commit 8f754f516eb15179095b0e98091107d1dce47138)
Merge pull request #54 from CyanogenMod/stable/cm-11.0

Update to upstream