Add SURFACEFLINGER_FORCE_SCREEN_RELEASE to fix screen off flicker

Needed on (at least) crespo, aries and galaxys2

Change-Id: Iaff5379775b9a19bd3cd8598e885e885cc0e8492
improve BOARD_USE_LEGACY_TOUCHSCREEN (naobsd)

Change-Id: Ia5f3ccc9deb161ceb1729216c9db81ee71de616b
Hiding media from folder with .nomedia file. (cyanogen)

Change-Id: I24e245f150f4619d3efd8b79b55b02ba7a11bd44
stagefright: Fix playback for mkv files with lacing

Most mkv files having 'lacing' in their audio section to save space.
Android did not handle this properly, sending all frames in the block
with the same time code, which causes stuttery playback.

Change-Id: I4dc76e7c2a53126c7fbdd3628fe7d339d2e3364e
Corrected error in screen backlight level

This allows for backlight to decrease when changing to dimmer location
when phone is not connected to a dock.  Previouos setting had reversed.
Monitor device storage directly in /data/data

The DeviceStorageMonitorService watches over /data, and when things get
full, starts deleting app cached files.  The app caches are actually
under /data/data, which on DINC is its own mount.  This means the
monitor did not notice when app cache grew too big, as it only saw the
size of /data proper.

This patch makes the monitor look at /data/data instead.  For DINC, this
means it can properly manage app cache, but it won't notice if the upper
/data partition is getting full.  That's not as common as /data/data
filling up though.  For the Samsung devices that mount a /datadata and
then symlink to /data/data, it should also work, as statfs dereferences
links first.  For all other devices with only /data, reading statfs on
/data/data still yields the total/free sizes of the /data partition.

(cherry picked from commit fc99763ade87f9943b2fbfb2e81fb3401998cd2d)

Change-Id: I85ed6486c1085c4de2f5a7e825709f01d8cc8cba
Allow mounting of multiple volumes via mass storage (framework part)

The volumes to mount is taken from storage_list.xml (allowMassStorage)
rather than ro.additionalmounts in CM7.

Hand ported from the following patches:

commit 0233209827d95221399b1fe0185f79863fc6bf26
Author: Tony Layher <layhertony@gmail.com>
Date:   Sun Jan 2 12:46:38 2011 -0500

    forward port of 93bb95929a0c017498625a87654b4d114fe17b96 to allow mounting and sharing of mulitple volumes to MountService.

    Change-Id: I9fa3994e6e7b85360b451f57c1cdd4df921bc035

(the second part of the above patch was not ported)

commit 678fadf517126c8468ef2d8dcaea9c9fce96035b
Author: Josh Stone <cuviper@gmail.com>
Date:   Sun Nov 7 13:38:58 2010 -0800

    MountService: Remount all volumes after USB disconnect

    If USB was removed while UMS was enabled, the MountService was only
    remounting the primary share.  Any other shares, like the HTC Inc's
    emmc, were left in limbo.  This patch now iterates over *all* shared
    volumes to remount after disconnect.

    Change-Id: Ie6fd49ad80ba6fa0e4e194a386549cac786b4bbe
    Signed-off-by: Josh Stone <cuviper@gmail.com>

commit b1da9ed003edcd10ccda56fdf087e8f1b0f77b2a
Author: Josh Stone <cuviper@gmail.com>
Date:   Sat Jan 22 12:03:53 2011 -0800

    MountService: Only notify PackageManager for true ASEC changes

    MountService can be dealing with multiple mounts (emmc, sdcard), but
    only the EXTERNAL_STORAGE has any ASEC mounts on it.  Since the PMS
    updateExternalMediaStatus doesn't specify the path, we need to make sure
    it's only called for the real ASEC mount.  Otherwise we get into nasty
    race conditions when multiple mounts are coming and going, like during
    UMS transitions, and sdcard-installed apps tend to break.

    Change-Id: I85c6a601e84afd30b44270b0892686c2d864ce8d

commit c8c58f3d14fbb8c77ab1e90541e59fb74bef54cf
Author: Josh Stone <cuviper@gmail.com>
Date:   Sun Mar 6 12:34:50 2011 -0800

    MountService: Unmount secondary volumes more carefully

    Use the same message handler for unmounting both the ASEC external-
    storage path and any secondary paths like emmc.  This seems to help with
    additional race conditions encountered on Inc.

    Change-Id: Icca71756fa6721bd85da1f35b8b8c7fc7caa1eb1

commit 47495ab860ed97499e0c4268bf40b1f9c429bf99
Author: atinm <atinm.dev@gmail.com>
Date:   Sun Apr 10 14:50:41 2011 -0400

    Allow multiple shareable SD Cards by using getShareableVolumes()
    to get all the volumes that are shareable and allowing
    sharing/unsharing for all of them rather than just the hardcoded
    getExternalStorage calls.

    Unmount immediately if PM is not updating and not an ASEC
    mount. Change from Josh Stone.
    Change-Id: Iaf1a7a4484deac373e1c1d7bf16d5f22ca49fd64

    Only allow package manager for sdcard (packages aren't on
    external card).

    Change-Id: I0d148ea52dc1285905a9dd061d1ceedcfb761b52

    Take out extra logging.

    Change-Id: I6beb007700ef4be04c3eb273bbf2069c87b30011

Change-Id: Ibc11b9affdf22a438a4d25cf14435fb16b3ad6d6
Make "SD Card removed" notification dismissible if the removed SD Card is not the primary storage

The Galaxy S uses the "external SD Card" as the extended storage
and it the notification should be dismissible as it's okay not
to have it.

Additionally, this patch also not hide the USB storage mount dialog
if the removed storage is not the primary storage

Change-Id: I524b294c57ba80f19cf1af808af65ce1308f5a0b
LegacyUSB: Add support for legacy USB implementations

Change-Id: I511a214a03616c72f920878c7b9bc27e3a867325
installd: Delete cache properly for devices using datadata partition

The java side already checks /data/data for free space but installd
still checks /data causing it to never reap the cache (because it
thinks that enough free space is available.)

Change-Id: I191f3ceb84df1101ab2918ec0038213d72ec1ce2
LegacyUSB: add overlay for UMS lun and use existence of lun to enable legacy USB

Change-Id: Ibc8e053d60408de0c6d87c38cdc5812a10828351
formatting

Change-Id: I8430704cfddecb049c6bb5f69f4d5926077f838f
framework: Add a version of Environment.getExternalStorageState which accepts a path parameter

Required for improved media scanner on devices with emmc

Change-Id: Id215238f3503221b06459dfa241c2c52ea6a0baa
Add LegacyUsbDeviceManager::setCurrentFunction method.

Method implementation is the same as UsbDeviceManager::setCurrentFunction.
The override is required to use LegacyUsbDeviceManager's mHandler, as
UsbDeviceManager's mHandler is an uninitialized private field.

Change-Id: I9ffece5247c17de77fa799e1f6c9b439ebd074db
add USB mass storage notification to tablet status bar

Change-Id: I20f59b93b81fcab3891f004b3b4a10bfeb44fff4
add option to specify a different MTP device name

some devices (specifically Samsung) use a different device
name for MTP. Allow option to set it in BoardConfig.mk
ex: BOARD_MTP_DEVICE := "/dev/usb_mtp_gadget"
 libgui: Add workaround for older Tegra2 devices

Change-Id: I28b328c17a1807eb45a329c4786c8f5ca2f2abed
Fix hardware keyboard support + workaround (cyanogen)

Change-Id: I658769a350fa80d79f02c66e2d727caa58aff792
headset fix (dh-harald)

Change-Id: Ie48aecc482f5e7b42c87931c1ed67d11a2b19d54
Fix Apache stack (aosp)

Change-Id: I6f64523bbf3b9fe7dc87c4222b2da538aedf3223