Frameworks: Optimize more and fixes

Batterybar this time

- unregister observe
- fix another old old glitch in center mode
- code cleanup

cheers

Change-Id: Icddcfe7664b24dfb54ea45c34ce1b179fc368ef2
Remove duplicate if statement

Change-Id: I7a9605815186d1dda79085bffa4250ee7497a5ed
Bugfix : Quick pulldown sometimes flips when it should not

When your Quick Settings Panel is set to

Quick pulldown : right

Sometimes (very intermittently) the tray flips (to Quick Settings) as you pull it down from the right side.

This is happening because the pull down happened so fast you can see the top 0-10 pixels of the tray,
and because it was showing the notifications, not the Quick Settiings

However the user expects the tray not to flip, but to just be on the Quck Settings.

The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar.
If this is the case, then the quick panel is swapped to (without flip)

Special Thanks to my daughter Jenny fo painstakingly reproducing this bug.

Change-Id: I8fdbedb1aa6d4fd672bd4cb58b7c99557469ab62
SystemUI: Avoid "phantom" status bar collapsing

There is one specific case where the status bar may collapse
for no aparent reason: When the last notification is removed.

If Quick Settings panel is showing while such a notification
is removed, the status bar WILL collapse -- and the user may
be left wondering why, because the notification that was just
removed isn't visible in that case.

A way to reproduce this behaviour follows:
  1) Settings -> System -> Quick Settings Panel -> uncheck
     "Auto close panel"
  2) Dismiss all notifications, even the sticky ones.
  3) Open the Quick Settings Panel and tap the apropriate
     tile to light the Torch
  4) Tap the tile again, to extinguish the Torch.

As you can see, the Quick Settings Panel collapses. This
happens because Torch puts up a notification, when lit and
removes it, just after it's turned off.

This will happen to whatever notification that hides itself,
e.g. a GMail notification, which vanishes when you read the
e-mail on another device. This too will trigger this issue.

-----

This patch prevents the bar from collapsing, as consequence
of removing the last notification, when Quick Settings is
showing.

Change-Id: I8c7c015c836810a465268b25b90c9166c4485a9f
Sound Toggle: Improve logic with new icons.

Credits Icons: Oliver Geith
Holo Light changes
Policy: fix keyguard statusbar showing while in ext desktop, fixes it in
apps like currents as well

Change-Id: Id3e4b99d60c33e4050e0e97c365d1ae739f603ec
FW: Navring Rework.

Moves drawables and static strings to Frameworks, Removes
some redundant code from RC.

Needs awesome action update for now if we dont add it ill
rebase.

Rebase and clean up, plus I added the option to turn "off" the
navring by setting all targets to null or none.

added logic for custom icons

forgot to add Icons to the settings observer

adjust some long press logic

Change-Id: Iff157e4e49407f46284f52697befe6cc3d5a42d7
One is enough.
Fix conflict
Derpy
Framework: QuickRecord Tile (2/3)

PS2: Stop FC on Auto-Stop Recording
PS3: Allow Playing of File If not recorded
        in this SystemUI Lifetime && fix FC on
        file not existing
PS4: Refresh Playing/Recording On Demand && Cause Layout Issues
      -Layout isn't utilizing tile info & is thus lower rather than centered
        Layout Should Be Fixable...this method might be temporary.
        Too tired to think.
PS5: Urgh Rebase
PS6: Fix Layout issues from PS4
PS7: Resize xhdpi images to 64x64
PS8: Add File Check && User Instruction String
        Change Default String & Add "Recording Captured"
        String & Icon on a two second timer.
PS9: Don't allow playing of file if it doesn't exist.
PS10: Images!!!!
PS11: Remove "WIP" from title.
PS12: Revert audiosource.default back to .mic
        (Higher Quality)
PS13: PS12 somehow managed to corrupt some MDPI images.
PS14: Change Timer to PostDelayed
        (Assuming this is better.  Hopefully some input?)
PS15: Operation makeJonStanfordHappy
        (Operation makeMikeHappy might end in lulWut)
PS16: Operation makeMikeHappy part1
        (Mike mentioned the idea of a switch rather
         than booleans, which I like...upcoming.)
PS17: Operation makeMikeHappy part2
        (Switch Statement)
PS18: Operation flipMikesSwitches
        (LULIDK)

To-Do:  Wait for Roman...and...that's it?
           (Jerk<3)

HUGE thanks to Dustinb17 https://twitter.com/dustinb17 for the icons!
Huge thanks to Shane New for making him do it =]

Change-Id: I4ae639b9684861cc7831c465530ae87634773c0d
More conflict errors
Revert it's behaviour atm. I don't think we need this atm.

Revert "Policy: fix keyguard statusbar showing while in ext desktop, fixes it in"

This reverts commit f33927efd9bd33e9058ebe14cc0a9a6e794bf07b.
Fix conflict
Check and fail early if requested wallpaper size exceeds maximum texture size.

This fixes an issue where OpenGL initialization succeeds but buffer allocation fails because the requested wallpaper size
is too large (or otherwise unsupported) by the graphics hardware. This fixes an issue where SystemUI crashes constantly
on the PandaBoard when connected to a full HD display. Tested only on PandaBoard, no access to alternative hardware.
Signed-off-by: Wim Vander Schelden <wim.vander.schelden@philips.com>

Change-Id: I8d2e1ae9fd9772977c4e365f23f2f58bbca3787c
[HTML5] Implementation of WebSockets (framework).

Added binding to android port for Html5 WebSockets.
Added external API for enabling\disabling from browser.
SSL Web Sockets are not implemented in the current version.

Change-Id: I8b7a42780410cb9f043e1f16570ea50db68e00ea
PIE: animation revamped (back to the first draft), style changes

Change-Id: I9e521ed4f7be2df629f58d933bad286486ec4a71
New PIE
PIE: narrow down inner arcs for even gaps