Add support for custom buffer sizes.

Add native window properties NATIVE_WINDOW_SET_BUFFERS_SIZE to the
perform function of Surface to set the user defined size
of graphic buffers. This is needed for adding support for
the playback of interlaced content.

Change-Id: I8354c29d2ffcc03178fae86dfa449cbefd24ae55
Add ifdefs for QC-specific custom buffer size feature

Change-Id: I317fa6fea1bb607858adbf4dd206d383ff9ca717
sensorservice: Register orientation sensor if HAL doesn't provide it

 * In KitKat and on most Samsung devices, the orientation sensor is
   not getting registered, and makes the compass non-working in a lot
   of apps. This patch enables the sensor for such devices.

Change-Id: I0ebba72ec4aa2cfa02c21a6daff0c356c6793fd0
(cherry picked from commit 98fa6f1152da759ef3eaf36cb16e0aaf2013376a)
sensorservice: Fix init sequence for pre-1.1 API sensor HALs

The sensors API introduced a new flush() method that older binaries
won't have. For those, replace the firstFlush invocation with a
setDelay call since a lot of implementations interpreted that as
the initialization step.
We also don't want any kind of call to flush() to happen when it
isn't there, since it'll either hit a random OEM extension or
a memory address we really don't want to execute.

Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620

sensorservice: Set the rate for pre-1.1 HALs _after_ activation

We want to be sure these are applied in the same sequence they
used to be...

Change-Id: Ied2ba08ed3c4bed3a80bac6ab5471fcea9ba2c09
frameworks/native: Use direct project pathmap

Change-Id: I0abbab64ca034944eec6878c5d0ad655e1aee38e
Revert "Add Digital Pen hovering cursor support"

This reverts commit 452395a7b0be15409f8f24631fc55baec3bf97e5.

Change-Id: I56044073a2be926355e6ffe273ad5c014e628d52
sf: Make sure HWC_BLENDING_NONE is set for opaque layer

Before configuring the layers to HWC, make sure
HWC_BLENDING_NONE is set if the layer is opaque.

Change-Id: Ie84aa9d93e98a244692a0cffc2de653a9079f8b4
inputflinger: Add gesture sensor support

Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2
Add GESTURE_SENSOR input source

Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783
sf: Add a NULL check in getDisplayConfigs

Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: I1a12f43b7c375b9c01998dadd5b658275c733fb2
sf: Add RGBA_4444 and RGBA_5551 format in getFormatStr function

Add RGBA_4444 and RGBA_5551 format in getFormatStr function to log
string name instead of format number in dumpsys Surfaceflinger log.

Change-Id: Ib8423f27ce6bc0fd1b99e7610a870b39ff6441c0
sf: Rename default app buffer count property

We are setting default app buffer count property from HAL,
and there we can't go with read only based property.
Hence renaming it.

Change-Id: I9fd4bdb50aca35647402c59b24d78ad5f878aab5