Two REMOVE_PROVIDER messages caused by race condition.

Fix a bug in unstable ContentProvider.
IllegalStateException: ref counts can't go to zero here: stable=0 unstable=0
IllegalStateException: unstable count < 0: -1

There is a race between main thread and background database thread. Main thread
is responsible for handling the REMOVE_PROVIDER message. Database thread starts
insert or query request again and again. acquireProvider in db thread will often
snatch provider from the jaws of death, sometime it fails to remove REMOVE_PROVIDER
which is already fired out from MessageQueue. But completeRemoveProvider in main
thread gets suspended when trying to execute the critical section. If db thread
released the provider before main thread resumes the execution, then two
REMOVE_PROVIDER messages will be executed.

Change-Id: I8588aa1d1a8bc444dcd2adf6f8bc3f055cebbdc4
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Fix spurious ANR occurence when MOTION batch event is not served by the InputTransporter

Sometimes Batch event of MOTION type is not processed by the Input Transporter
even though it is queued to the waitQueue-Responsible for ANR whenever any event
response does not come from the App. To fix this issue, one Boolean lock is added.
Thus InputTransporter wont ignore the Batch event.
Issue: https://code.google.com/p/android/issues/detail?id=41755

Change-Id: I3bb2eb4cf1f8ecdd1d04671c0e8205dee4ad3a6c
FW : Fix  Tablet Layout (Clock & Notification)

When Center clock was chosen as an RC option, the clock would
dissapear from the StatusBar and Notification curtain in tablet
mode.  Also StatusBar notification icons were not aligned with
clock & signal icons.

This fixes both of those issues.

Change-Id: I8ce79314c42b322f4e13c102815131c400c562c2
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Change-Id: I49a7f2fb99dc8b9560e7c17421125356e45a87ac
Add keymapping for select BT headsets

Per CYAN-522, select BT headsets (e.g. Jabra Street, Jabra BT3030, etc)
send key 159 for fast-forward button, instead of the expected key 208.

Need's testing with affected BT devices.

Change-Id: I06ba689f77dd1058fb82b1de9f72b4df59150cf9
Prevent Sym key from showing the IME picker

By default InputMethodManager will popup an IME picker when pressing
the Sym key.

This can be disabled by setting config_symKeyShowsImePicker to false in the
overlay (so the Sym key will show the symbol windows selector for ex.)

Ported from jellybean (was Change-Id: Id61e2d1d66babbb5bd15d7dcf280c1cb76bced46)
http://review.cyanogenmod.org/25787

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I5ee2542c081dca14d2e22724cc2616519716dd45
am: Allow more hidden apps on devices with lots of RAM

 * If more than 1.5GB is present, allow up to 40 hidden apps.
 * Number is somewhat arbitrary, but was found to work well on D2.
 * Also look at the sys.mem.max_hidden_apps value if given.

Change-Id: I2d3cf6e0dad1bc0b482cc37bf9c61ed2f2b4be51
Allow theming of lockscreen

Change-Id: I10799482e0b393746b4c9818f94862109fac6006
Add back backlight brightness curve adjustment.

Change-Id: I1dbcc9a35b44abc077e2722a4e81eb1e83d463fa
Signed-off-by: kecinzer <kecinzer@gmail.com>
Ability to hide Volume State toggles in Power Menu (Frameworks Part)

Patch Set 2: Formatting Stuff

Change-Id: I7a1de9411c20c4a201ff91790be9e61581b89aee
FW: add spacers to Traditional Toggles.

Scrollable toggles merge also included adding backgrounds to
traditional toggles.  on rows that didn't have 6 Toggles,
those backgrounds would be stretched.  This adds
spacers on the ends of the last row to force the toggles/
backgrounds to keep the proper size/shape.
samples:

http://twitpic.com/cecf8t
http://t.co/32t0A6Qc6T

PS2:  Include background drawables on spacers. Looks a little more
uniform.  Samples:

http://t.co/ryaHhizEgF
http://t.co/fw5QZAsocQ

Change-Id: Id086383ec72e682b8f005e9a17b6ecb6bd0e018b
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
MDPI devices compatibility

Patch-set 1: Now Lockscreen configuration in ROMControl doesn't crash

Signed-off-by: utak3r <piotr.borys@gmail.com>

Change-Id: I405331498128ee59b0603dc191db5adfa8d0db89
SysUI : Fix opacity of LastApp Icon

Thanks to Nitroz for making alpha corrected versions of the
last app icon.

Change-Id: I2e8a9ae36e32f03aa36d3218c74d76b88123e64e
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
SysUI:  Prevent Kill-Task from killing SystemUI.

If recents screen was active when Kill-Task button pressed, SysUI
was getting killed (causing wallpaper reset).  This
prevents SystemUI from being killed.

Change-Id: I3b669b29e5c244246ac02ad1ce6b4e39f7270aaa
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
Revert "Add CM Lockscreen Targets"

This reverts commit 3bbda06f861bdaeb3c54d8168b5837ca580f42ce.

Conflicts:
	core/res/res/values/dimens.xml
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
FW: Lockscreen rework WIP

The frameworks side of trhese rework is basiclly adding
Lockscreen targets and removing unneeded and used variable left
in by google.

Patchset 2: fixed landscape issues with phones

Patchset 3: Added null check for uninstalled apps.
            Add some logic for padding if the 6-8 targets are used.

Patchset 4: Removed option for long press challange unlock, I dont think
            this need to be an option it should just be default.

Patchset 5: Fix rings around targets.

Patchset 6/7: Fix big empty icons in the rc ui.
            Fix layout for 6-8 targets again...

Change-Id: Ic9a4b4f85c674dc9d4097541d447723e2dd47956

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
CRT screen off animation user defined (1/2)

Signed-off-by: kecinzer <kecinzer@gmail.com>

Frameworks: ElectronBeam get some love (1/2) - SlimBean

https://github.com/IceColdJelly42/frameworks_base/commit/33dac546610431031a260642f0dd51fedc36863a

This commit removes the CRT On animation because it is just
not nice implemented from AOSP and not really needed. If ppl
turn on the screen they want to see fast their content. But still
CRT animation needed some love. So this commit introduces another
SlimBean mode. Crt animation mode:

Features:
- Crt Off animation controll (on/off like it was before)
- You can select different crt off animation modes
- always horizontal (stock behaviour)
- always vertical (screen collapse from left and right to the middle)
- orientation dependent (means portrait = horizontal animation, landscape = vertical animation)

cheers

Change-Id: I0d5531791a306cc32c467610d37c8f56b0f67a96
Revert "FW: Status Bar Hide toggle (1/2)"

This reverts commit f4204c88ca44584a015ad72741756037b416fe01.

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_statusbar_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_statusbar_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_statusbar_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_statusbar_on.png
	packages/SystemUI/res/values-cs/strings.xml
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
Revert "FW: Status Bar Hide toggle (1/2)"

This reverts commit 5848be96de6f1188c2791b2b2c14d0f3362238b3.

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
FW: Status Bar Hide toggle (1/3)

Adds new statusbar toggle into power menu navbar control.
Tested on maguro.

Patch-set 4: Reverted selected button logic
Patch-set 5: Reverted of reverted :)
Patch-set 6: Added czech translation and RC part
Patch-set 7: Added quicksettings tile and shortcut intent
Patch-set 8: Fixed build errors
Patch-set 10: Some czech translations
Patch-set 11: New icons, changed variable names, fixed show logic
Patch-set 12: Rebase
Patch-set 13: Removed previusly added czech translation of other words
Patch-set 14: Resolved conflicts
Patch-set 15: Finaly reversed active icon in power menu. Move some code due to conflicts
Patch-set 16: Rest of new icons
Patch-set 17: Fixed conflicts
Patch-set 18: Completly rewrite of toggle
Patch-set 19: Reversed toggle active state
Patch-Set 20: Re-do NavBar Toggle in Power Dialog to match
              existing StatusBar Toggle
Patch-Set 21:  Derp - forgot to add drawables
Patch-Set 23: Removed navbar text size dependance

Change-Id: Iafdbac9fb5830762c12ac0d9a6569723f39a64de
Signed-off-by: kecinzer <kecinzer@gmail.com>

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_statusbar_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_statusbar_on.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_statusbar_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_statusbar_on.png
	packages/SystemUI/res/values-cs/strings.xml
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/res/values/strings_toggles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/toggles/ToggleManager.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java