Stagefright fix to support QSD8K for hardware encoder

Change-Id: I78adbe125f1746cfb62183e467be38b205c88e05
DynamicMemoryManagerService: Add DMM functionality.

Call Power API's to switch unstable memory between Active/Disabled states.

Change-Id: Ifb2c3c114a0a420ef38edf1e524c49ce490390ff
frameworks/base: Add cpu governor service

Increase sampling rate when the display turns off and set it
back to the original value when it turns back on. This helps
reduce power consumption for use cases such as MP3 playback with
the display turned off.
frameworks/base: Vote to turn off io_is_busy during recording.

When recording starts, vote to turn off io_is_busy. After
recording stops, take out that vote so that io_is_busy can
go to its original value. Doing this saves power by reducing
the amount of time for which the CPU runs at high frequencies
when encoded data is being written to the SD card - a process
that causes io_wait times to shoot up. With io_is_busy turned off,
these wait times will not be considered as CPU busy time and so
the ondemand governor will not unnecessarily bump up the clock rate.
The votes are handled by the CpuGovernorService. Also move the
dynamic sampling rate and vote processor classes out of the
CpuGovernorService to improve modularity.
MediaRecorder: Remove creation of new thread when voting for io_is_busy

Change-Id: I682b91be2a001f19eb4b8c90a4d0e450bbbe1f71
CRs-Fixed: 339691
QCOM-related cleanups

* Hide qcom-specific methods from the API
* Disable service classes
* Fix media-recorder start/stop for non-qcoms

Change-Id: I42b1acb5c732182663fea89039f57e775afb3ebe
performance: Add Performance class

New Performance class to allow system CPU control

Change-Id: Ie476aefcec7fc20cab8d747ef7c3994b26fcbb62

Conflicts:

	core/jni/Android.mk
Add cpuSetOptions API to org.codeaurora.Performance class

Change-Id: I66f7e910f4fee0a9d443356b00b452872628d3f0
Add CPU1 min freq option to cpuSetOptions in org.codeaurora.Performance

Change-Id: Ib5e40d0eaf96f54b06c6f10bb620c4f6a39529fa
Browser sets up the min freq while scrolling

Change-Id: I02b14f0d6aff1dad6c20179a124c7821e50ceafa
webkit: Reduce processing in WebCore thread while scrolling and zooming

Change-Id: If29ccd0248b02f3dbc02957494d2aa942c7112ac

Conflicts:

	core/java/android/webkit/WebView.java
SurfaceFlinger: Handle WFD and HDMI concurrency.

- changes to handle wifi display and HDMI concurrency
- rename enableHDMIOutput to enableExternalDisplay
- remove action safe related functions(not used anymore)

Change-Id: I15feb1309c2964de3deb968c334eb09e742afb6c
frameworks/base: fix delay in HDMI update

SF threadloop now checks for dirtyregion and returns
if it is empty. Mark dirtyregion as nonempty so that
threadloop actually executes when required

Change-Id: I00e132433922509468b258c33279c819b3294d73
CRs-fixed: 327432
surfaceflinger: call perform function with custom events to HAL

- SF will call perform with event and value to inform HALS about
  custom events(external display, orientation change etc.,)
- remove actionsafe related functions.

CRs-Fixed: 341947
(cherry picked from commit ca1e7b9ee353bc4d2fdc2234d8860e84bbff74f1)

Change-Id: Icfe5f2f8ce56561c6959e206771b2850a3597e70
SurfaceFlinger: Let HWC handle an alpha blending
                when either C2D or DYN is set

Before we only use GPU to blend an alpha value.
However C2D can also handle the alpha blending,
when the composition type is set to either C2D or DYN,
use HWC to handle this.
And set the alpha value of C2D to HWC_BLENDING_PREMULT,
so later C2D can set alpha blending parameter.

Change-Id: I53be1d4219fbf2467a6391276d59213858a50058
Revert "SurfaceFlinger: Set the correct composition type in dumpsys"

This reverts commit 507bc3a6576f47f6576777829a72c5f5b6913079.
SurfaceFlinger: Set the transform value correctly

When using the transform value, read only last 4 bits
of it regarding the change of
transform value in Layer::setGeometry().

Change-Id: Icdb2c9d8c283867a273e9633a7a563516f6af637
Depends-on: 120066
Fix build when TARGET_QCOM_HDMI_OUT is true.

Change-Id: I62e20cd742f9808a4ba3a496dd20ca27d46a845e
Signed-off-by: Evan McClain <aeroevan@gmail.com>
HDMI: Temporary qcom HDMI fixes

Since we still don't have a user-controllable Setting to enable HDMI,
enable it by default.
Also, for devices with trouble matching the HDMI clocks in the receivers,
add the possibility of letting the controller choose the resolution
on its own with the build-time TARGET_QCOM_HDMI_RESOLUTION_AUTO flag

Change-Id: I3ca0639e9f644872a3585f04f2cf8180d8451f2c
HDMIDaemon: Store actionsafe width and height as a system property

(cherry picked from commit 9b6f55560bf5066ea4ba9670d2d009f2b6c36e3b)

Change-Id: I63c213c2f203e63c8047f597e33d06026085c0c8