Allow disabling the IME selector notification (1/2)

Credit CM

Signed-off-by: Ricky Salinas <rsalinas1@mail.usf.edu>
Fix double finger when 'Quick pull down' is disabled.

If "Quick pull down" is disabled, never do the function "switchToSettings()" and the stock double-finger feature doesn't work.
The OTS preferences only need to check the "statusbar portion" code.

Change-Id: I245854922f2e643e317f7aadd45043542e2f9871
Framework: Create "on-the-spot" preference dialog only if needed

Right now a new instance of the "on-the-spot" preference dialog gets created
each time when the user taps on the immersive tile or each time when the
user pulls the statusbar from the right side. It should only be created if
it's really needed.

PS2: RecentsActivity clear all
PS3: Made method static and check is in SettingConfirmationHelper
	(thanks to Yamil!) + rebase ("Long press recents to switch to last
	 app"
PS4: Removed unneeded variable

Change-Id: I464edebbfec9e3452d36876ed8ef69ab915fd872
Signed-off-by: Parthipan Ramesh <parthipan.ramesh@gmail.com>
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
Media process is crashing with NullPointer exception

Sometime, while creating thumnails list of media files in
compose MMS->attach file,  filepath may be null due to
synchronization issue.
Adding NULL check to avoid NUllPointer exception.

Change-Id: Id6cf5612a959b3ae15b44bc60dbbcbe40c624f09
CRs-Fixed: 636494
frameworks/base: Fix change propagating issue

destroyLayer() function has been modified in kk. It is not correct
to propagate the UI corruption fix from jb to kk without considering
the new changes made in kk. This change is to make it align with
the new code in kk.

Change-Id: I34d11b230b9390fe8a989ab6f9c7d3a48d586205
Merge "Allow disabling the IME selector notification (1/2)" into kitkat
Merge "Fix double finger when 'Quick pull down' is disabled." into kitkat
Merge "Media process is crashing with NullPointer exception" into kitkat
Merge "Kill floating activities running in the same thread when tapping outside" into kitkat
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat

Signed-off-by: houst0nn <houstonn@gmail.com>

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

Change-Id: Ia8b4f44a08396b7754799d07a6473aa028d0b97d
Fix a NPE when putting a null-Bundle in an Intent

Happens frequently e.g. with GoogleAccountAuthenticator

Change-Id: I284bf153f40ee9cc3e70bce6efcc3b9e6706361b
Revert "Set some GC parameters only for dalvik"

This reverts commit de4539603e165f8df0d23a21b6a285213d7f712e.

Change-Id: I2fd71b8b8b6e72cdbe929bfc2afe275cb46e6c29
Bluetooth: Adds check to verify Bluetooth adapter state

This checks whether bluetooth is turned ON or not in
BLE stop scan process. BLE scan apis are called from applications
so need to check if BT adapter state is ON to avoid Bluetooth
crash

Change-Id: Ifc472be9b3f8baf978d6cdca2e4743a75b951635
CRs-Fixed: 634617
Bluetooth:Settings:Handled ACTION_STATE_CHANGED intent at boot time

BluetoothAdapter.ACTION_STATE_CHANGED intent is added to foreground
activity to handle BT sync issue with  Power widget at the boot time

Change-Id: Ib26cb4630c711587da789dc920aa66ded97a9a3b
CRs-Fixed: 576879
Send Media button events as foreground Intent

Send foreground intent for Media Button events to Music Player
so that there is no delay in handling these Intents after the
device is rebooted.

Change-Id: I952a8af93586cb96c0a9f6dc910bfb49287f4b9a
CRs-fixed: 611219
Merge branch 'kitkat' of github.com:AOSPA-legacy/android_frameworks_base into kk4.4

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: I613f95be2f5f51c4014a0e9ac64e2bd482acee49