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
Profiles: add PROFILES_STATE_CHANGED_ACTION broadcast intent

Added a new broadcast intent to profiles manager (PROFILES_STATE_CHANGED_ACTION), for
notify an event when profiles are enabled or disabled.

Change-Id: If701b3be54157c23acdf74e1da658fbce335437e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Merge "Bugfix : Quick pulldown sometimes flips when it should not" into cm-10.1
Merge "Profiles: add PROFILES_STATE_CHANGED_ACTION broadcast intent" into cm-10.1
FM Radio: do not try to change thread priority

The FM Radio services try to change the current thread when
instantiated, for unknown reason. This actually ends up changing the
priority of SystemServer's main thread. Probably a bad idea. This is
the cause of the various glitch fallout after the FM Radio merges.

Change-Id: I292aff3380c717ff1bc7d45f6303c0d330ef642d
Services: Adding HSPAP info in Android

HSPA+ management is missing in GPS Loc service.

Change-Id: If828c1b078d5989f501c3eb917a573a6db773453
Author: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Regnier, PhilippeX <philippex.regnier@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 41786
GC triggering performance optimizations

Copy the correct starting heap size at process init.
Interfaces to set GC/managed heap parameters.

Change-Id: I0154d1523c3cfdb1214ed0315193cbb24704351f
frameworks/base: vectorize Bitmap operations

Enable gcc vectorizing optimizations for Bitmap operations within
libandroid_runtime.so.  Adds -ftree-vectorize -mvectorize-with-neon-quad
-fprefetch-loop-arrays to functions and compiles Bitmap.cpp in ARM mode
(necessary to enable vectorizing optimizations) for appropriate targets.

Change-Id: I12defef6f47adf41af849df6e750097f5906d92d
SystemUI: Fix dock battery icons for phablet UI

For mdpi devices, the dock battery icon in the status bar is too large and do
not match the size of the stock battery icon:
http://img835.imageshack.us/img835/8207/screenshot2013020910320.png

This fix will have the battery dock icons resized to the right size:
http://img546.imageshack.us/img546/8302/screenshot2013020910233.png

Change-Id: Ic6ec875f4ebe29b33edf6cba6997db0ea1b70aeb
fixed inconsistant define values with android_nfc.h

Change-Id: Idccd2de60caf7b72839d158b39d14e2cfcdd5fc7
Framework: AOSP Fix - starting window memory leak

If starting window is added to arrays like mViews in
WindowManagerImpl.java, but not accepted by WindowManagerService,
we leak starting windows. To avoid leaking, remove the view
from WindowManager.

Change-Id: I4d98b883e9dfaf5e71bdece385643ba1b59b2633
Have DashClock hide lockscreen clock

Patchset 1) Intial Patch
Patchset 2) Added Market package name also

Change-Id: I099cacc968c8da73ebf4b9ad80f401b39b7eb988
Merge "FM Radio: do not try to change thread priority" into cm-10.1
Merge "Have DashClock hide lockscreen clock" into cm-10.1
SystemUI : QuickSettings Cleanup

Introduce new class to reference from settings and SystemUI to avoid
code duplication.

Differentiate between configuration change vs tile layout modification.

Patchset 2  - Remove whitespace
Patchset 3  - Remove unused ids
Patchset 4  - Better organize the classes
Patchset 5  - Rebase
Patchset 6  - Introduce updateResources()
Patchset 8  - Update tiles to use updateResources()
Patchset 9  - Expand imports
Patchset 10 - Updated all tiles to support updateResources()
              Added dinamic tiles to mQuickSettingsTiles
              Optimized and standarized of calls to updateQuickSettings() from tiles
                 onPostCreate() -> updateTile() -> super.onPostCreate() -> updateQuickSettings()
                 updateResources() -> updateTile() -> super.updateResources() -> updateQuickSettings()
              Rebased
Patchset 11 - Remove unnecessary calls to update Quick Settings

Change-Id: I0baff915b4c3486cc0ac165e3e927399c2b15776
QuickSettings: Add LTE Tile (1 of 2)

Patchset 3 - Add proper drawables and update logic
Patchset 4 - Rebase
Patchset 5 - Fix build errors

Thank you to Bjorn Lunden for the drawables

Change-Id: Ia25d098020586e06d38589f84d3d1a581e7cbd9a
Merge remote branch 'cm/cm-10.1' into jb