KeygaurdSelectorView: Unregister reciever in onPause

Also check if we already have a reciever instance before
creating a new instance

Patch Set 2: Refactor field reciever to mUnlockReciever
           : Add null check to Context#unregisterReciever
Patch Set 3: Add null check to Vibrator#vibrate(int);
Change-Id: Ie9b03b20da29d05a64293ef6b7931393c34796a2
Fix Lockscreen FC/reboot

PS2: register receiver in onResume()

Change-Id: If475f0750bbc408e727eb0d3cf532c936ad418e8
Signed-off-by: Gergely Szell (sethyx) <szell@hu.ibm.com>
Audio Sertvice : Rebase and fixes

Change-Id: If677760fd782d4e789064eae21a791ee4edb2546
HALO: Option to pause the underlying app (1/2)

- adds an option to pause the active app when using HALO
- this is enabled by default for devices with low memory
- (currently: <640MB RAM available to the kernel)

Conflicts:
	core/java/android/provider/Settings.java

Change-Id: Id95410f7b9f03f6ebd1fbe4aa9a379ae3b0b8edf
inaccurate proximity support (2/2)

Change-Id: Ie5af6a071484ecc08218c848963e32db0de74ff1

Conflicts:
	core/java/android/provider/Settings.java
Revert "Fix ListView is not scrolled properly with arrows"

Fix incompatible issue with alipay
解決支付寶退出

This reverts commit 94cd42c348b7080d169313d4b1ac06a4751430df.
Reworked transparent layer
When a halo'ed window is opened, the transparent layer will be always visible. It will manage the background dim.
This fixes some apps dimming its sandboxed processes (like chrome).

LayerActivity manages its own lifecycle. When it's focused after paused it finishes itself.

System processes (identified by "android" pkg in SystemUI and system uid in Activity) don't use the layer and still use their own background. This
has been kept this way to not interfere with their activity.
HALO: halo can save last position now

Change-Id: I5a608b02323ab9fdfa3922a3c9844e75c3a1ab09
Finally fix incorrect flipping to quick settings.

Commit f6685c5ca84a42f5a47bf40827d6229dd998dee4 fixed this for the
two-finger pulldown. It reverted commit
c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f in the process, which was
incorrect, but fixed another condition of this problem occuring
nevertheless. The actual problem the latter fix tried to fix was that
the flip decision was dependant on the timing of the view layout:
getMeasuredHeight() returned whatever was set in the last layout, which
might not have happened when hiding the view, so at the time of the next
ACTION_DOWN getMeasuredHeight() returned the height from the time the
panel was last visible.
Fix that problem by using the height scheduled for the next layout, so
we're always up-to-date.

Change-Id: Ib97f34f9aa0a6f28d48b4ec3e16c82a814cda0d0
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
LayerActivity: Corrected lifecycle
Should contemplate the case that the activity gets stopped
Fix little derp causing visual bug

To reproduce, disable halo, and press "clear all notifications" button

Change-Id: Ice7ab62229e27db53ef51fd5df55dbcd0a86358b
Revert "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event"

This reverts commit 706fc3c4c5973d672e4afc07c212a7760d73c659.
Fix HALO button position with notification panel

Change-Id: I22293e1c9e4fe4db2bf7f213204ece983a33962b
Halo: Add master switch to disable Halo (1/2)

Change-Id: Ifb0f4e8abdce1ed3d4cc4c973edc08794781db64

Conflicts:

	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Fix Halo not showed at first notifiction drop

Change-Id: If991b5b5ea15f5070791f6d6c8ba6d9cc0ad1ad4
FW : Allow user selection of Font Size

PS 1 :	Bring back the option.  Fixed the OCD issues on signal
	activity & battery text.

PS 2:  Rework the formulas for calculating icon widths on signal.
	some themes use a variety of different icon widths to
	achieve different effects.  This attempts to scale those
	images uniformly, rather than the 1-width fits all approach
	of earlier patchsets.  This also fixes the extra space that
	was showing up between mobile & wifi signals when alt signal
	is chosen.

Signed-off-by: Zaphod <mwilson@acesappraisal.com>

Change-Id: I65661821e9e41e4bd8569c1a56b583719b64c886

Conflicts:
	packages/SystemUI/res/layout/battery_cluster_view.xml
	packages/SystemUI/res/layout/signal_cluster_view.xml
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/layout/status_bar_help.xml
	packages/SystemUI/res/layout/status_bar_icon.xml
	packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
	packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/SbBatteryController.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java