Floating window: Fix possible NPE

Avoid possible NPE if app provides no interface such as pushbullet's
test notification & other apps which provide one.
Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
QS: Fliptile animation [1/2]

Credits to TeamBAMF for the original work

Change-Id: I8382e110dd218d625f38beaa7592172905e08f3e

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/quicksettings/FChargeTile.java
	packages/SystemUI/src/com/android/systemui/quicksettings/QuickSettingsTile.java
	packages/SystemUI/src/com/android/systemui/quicksettings/ThemeTile.java
	packages/SystemUI/src/com/android/systemui/quicksettings/TorchTile.java

Conflicts:
	core/java/android/provider/Settings.java
Fix last signal bar being a pixel to high.

Thanks Adam!

Change-Id: Ic22c91c0f381d64e0f6cbb8dd341e919b9762047
Revert "Fix notification cutoff at slim dpi"

This reverts commit 620e72c448eda24ec6a3086ac9f418706178cbc6.
SystemUI: Add double tap to sleep gesture

Change-Id: I4c54718e8ec8774677d13917b3a7ffa3b4b18cb5

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/phone/PhoneStatusBarView.java

Conflicts:
	core/java/android/provider/Settings.java
Add null pointer check for ExifParser

Change-Id: I9a7eee8ebb571a186a57e5094e376e7a7d8ab4b8
WallpaperCropper: Fix crash when set .gif as wallpaper

It returns an equivalent scaled cropBounds as true
crop bounds, then it set the rounded rect by rounding
"out" the true crop rect, this make the rounded crop
rect may out range of the original bitmap, then an error
will happen.

We change to check the rounded crop rect, if it is out
the range of original bitmap, we set the original bitmap
bounds as rounded crop bounds.

CRs-Fixed: 622582

Change-Id: I215ef2a0165adaaadb05c62dee741a8ea6926144
framework:Thread synchronization for UI update

Issue : Framework reboot was observed due to out of sync between
        two threads which inturn causes Null pointer exception
        while updating airplanemode.
Fix : Handled Null pointer exception and the crash is not observed.
CRs-Fixed: 570122

Change-Id: I2e969f6e7726ffcf8648b366ebb54cb2b0afc292

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
Fix NPE causing a hot reboot when pressing power button

Change-Id: I7331f1abf70d131af8e0c09694f174fffd5fb9ef
improve rotation handling

this commit was rewritten/inspired by one made to our jb 4.1 branch by sonicxml.

cheers buddy!

Change-Id: Ib3b46aa54e7bf6602f8c0557ed770624063af529
audio: Volume can't adjust during HFP call when screen is off.

PhoneWindowManager don't pass the key to the application when screen is
off. In handleVolumeKey(), the STREAM_VOICE_CALL volume was set, so the
STREAM_BLUETOOTH_SCO volume can't be adjusted.
Add a judgement to choose the correct stream to adjust when screen is off.

CRs-Fixed: 649548

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I1ab06617d59b9bf2eabed9ed8b6892bc20db75b9

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Enable power menu user switcher [1/2]

Change-Id: Ic1900246b699a58fd4493e23a21f9e77b859a410

Conflicts:
	core/java/android/provider/Settings.java
Kill floating activities running in the same thread when tapping outside

This change makes all activities from the same app to be finished when we tap outside the halo window. Other apps running in different threads
(floating or not) won't be finished.

Port from here: https://github.com/ParanoidAndroid/android_frameworks_base/commit/f489f45ab2ba5dd4991c241917f7f4b0fd74b884

Change-Id: Ie6d6f46b2e23be60f991520ed480c2866fb2d0e3
resume: fix recents showing up when waking the device with the home button

Screen is on but dispatcher is not enabled yet.

Change-Id: Ib98d595563ed3df5c7a1e6e4d5a4da83a721537c
services: make sure to recycle set args

2 minor leaks found here in the screen magnification service

Change-Id: I1118bb8ca26d84633444241b2d5be6979cb39922
TouchExplorer: print error message instead of cause fatal exception

In stead of throwing exception to cause system server dead, printing
out error message will be more reasonable.

Change-Id: I6e9cfdbfaaed6c03972c223c46ed78bfb0e00069