Camera: Add support for QC camera features.

Added APIs and keys for all QC features. This
will enable application to get/set paramters.

Change-Id: I58a53c7b9133a3acddc34b268dac086c9562d533
frameworks/base: Watchdog to generate trace of Monkey

We need stacktrace of Monkey process to debug issues wherein
system_server gets stuck doing a binder call with monkey

Change-Id: Ie0be15662c68219fe5e95592c672b86ab0987e37
(cherry picked from commit c509d1147e321118f1c908502b0b9eb5ee2a5926)

Conflicts:
	services/java/com/android/server/Watchdog.java
frameworks/base: move the traces file to avoid data loss

If an ANR comes just after the framework reboot, the traces for
the framework reboot will get over-written with the ANR traces.
So, We are missing the traces for the framework reboot which
makes debugging the framework reboot difficult.

This patch will rename this trace file for the framework reboot
once the ActivityManager collects the traces.

Change-Id: Iee07b13ba02d8aab9cc43567aa5df131cc43c737

Conflicts:
	services/java/com/android/server/Watchdog.java
framework/base: Handle ASSOC-REJECT events

Disable current network and enable other saved networks(if any)
once number of ASSOC-REJECTs on an attempt to connect to a corresponding
network exceeds the threshold.
CRs-fixed: 484247

Change-Id: I59ca5b7bcb2cf8d205556feaac5871260a3fd8ec
Pick default interface for upstream.

With multiple upstream interfaces active and connected,
we should choose the default interface for upstream.
CRs-fixed: 461266

Change-Id: Ia3bc32300a1f77f46237994d0e38e9c9886f4bea
aapt: Support for mxmf file playback

mxmf files couldn't be played.
Added .mxmf file ext to kNoCompressExt array
CRs-Fixed: 465437

Change-Id: I4473380c0aa13f7c18b59aa48f07a87f7849a74c
libaudioeffect_jni: GREF leak fix for JB

- Excessive JNI global reference in AudioEffects.
- Global references created during native setup
  are not deleted.
- Global references are deleted in setup failure
  and during native release.

(cherry picked from commit a04a2bf4563dc20c52f4d4239e01f80b220077a5)
CRs-fixed: 413633

Change-Id: Ia4340a2128850101b394e00c8e1db9db49f516fd
Reduce total number of background apps for low memory devices

Due to memory constraints, we anyway cannot fit the default number
of BG apps. So instead of killing background apps to
free up memory when launching, start with an already
reduced background set of apps.
Another side-effect is that launch latencies also improve.

Change-Id: I3ae54aa7d53ff1b81252212973646a95d2d82e8a
Note: This is for low memory devices. (~512MB RAM or less)
framework: packageinstaller :fix logical error in size calculation

fix logical error in available size calculation.

Change-Id: Ic6ce312cf1c146030a20187fcb27b24fbe4c321a
frameworks/base: Fix to remove exception in tonegenerator

- Framework reboot happens, if tonegenerator fails to create
  a track in audioflinger.
- The cause for framework reboot is, an exception thrown by
  tonegenerator if fails to init.
- Fix is to remove the exception and delete the tonegenerator
  instance.
CRs-fixed:466491

Change-Id: Ie7b87f787d8a885cc70be9af4ba9d04ecd691cc2
geofence: Low power geofence HW implementation

HW implemntation overwrites the SW implementation

Change-Id: I8762b0b2e3c5001622f9c8aa2a845ee64104faa3
gps: LocationManager CTS proximity test fix

CTS proximity tests needs to use GeoFenceManager
for GeoFences to be able to see mock locations
CRs-Fixed: 452172

Change-Id: Ie7fca5e8078340e8fbbce6f9bb6a4cc62b72866d
frameworks/base: Add changes for Incall Music Delivery

- Add Flag and Stream type required for incall music delivery.
- Add Tone types for ToneGenerator

Change-Id: Ic05cd1af1172dda3c527af826c6e9a48d6ae20d5
NotificationManager : Rebind the notification listeners onChange

Rebind notification listeners when list of listeners change.

Change-Id: I7a14dacdf7a44a3bd71d28748a70d751507230df
Telephony: fix typo

Change-Id: Ic13235744fca561cff4d49ae5c799420c30a3840
hwui: Don't discard framebuffer on exynos4

The layers gets empty/not cleaned and redrawn on top of the preview,
causing beautiful glitch on homescreen, and drawing black instead
of transparency.

Change-Id: I633b104224c73c625f1193ee3dde41823cddc5bf
leftovers

Change-Id: I739b052c40ab5efe78343f4268215ffbce3932c8
Improve notification shade collapse code.

- Collapse after dismissing the last notification
- Avoid duplicate code paths for collapsing
- Improve variable naming according to AOSP review suggestions

Change-Id: Ic6f26a61f263c5beebbcc9725fe8914d3858576f

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Last fixes and a remove

we have already a damn stable base....although small features broke
or were removed during merge

- brigtness slider fixed (new API)
- toggle fullscreen on keyboard fixed
- autorotation keyboard fixed
- pie hide trigger keyboard fixed
- keyguard showed transportcontoll twice -> fixed
- removed the double tab code for home button....it does not make sense
with our current rebind implementation. Due that we plan to overwork
and centralize this as well like we did last time with a lot features
we will recode a more generic solution then google did

Only two things which are left is rambar das not show up and
QS layout needs to be nicer

All other is working as stable as usual

Change-Id: I32d0c1331a43b05a8c02e4a115fd4d9638066b30
Frameworks: disable not supported features on third party IME keyboards (1/2)

due that keyboards need to add the WRITE_SETTINGS permission to have
2 of our features working on 4.3 third party apps can break if they
do not set it.

Check the current active input method for the permission and disable
it if the permission is not present

Change-Id: Ib45311100387e4e67778f99b7111bfc91a1eca71