Allow mounting of multiple volumes via mass storage (framework part)

(cherry-picked from CM10)

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: I5ea83afeda6cdaf63dd15857b3827bb00afbd6d2
Camera : Powerkey shutter (1/2)

Allows user to take use power key to take pictures/videos

Change-Id: I85a1e1761199f4604672be42a3a5005227f5451a
PackageManager: fix app lib migration for device with /datadata

For devices using /datadata, dataPathString will point
to /datadata while nativeLibraryDir will point to /data/data.
Thus, compare to /data/data directly to avoid problems.

Change-Id: I11149cf9cc5a573cc85513e12d3569b514f5ffb5
Power menu: allow enabling user switcher

Change-Id: I089efbf2bec2339cb2630e597aa3778b6100c9c0
Framework: Forward port Fix Profiles Insecure lock screen not working

This fixes Issue 6226: The insecure lockscreen setting is not being activated with
the use of profiles if the default is secure (PIN or Password)

Change-Id: Iaba6d39df0000da073c3ea0c35de1c78f63ad08d
Framework: Forward port Fixes

1)  NPE in Power penu

This fixes the NPE when the Reboot item is disabled and the Profiles
switcher is not

2) NPE in notification manager if profiles disabled

No active profile group is returned and a NPE is triggered when a
notification override is being set

Change-Id: I5fa003ce08daf5ef86ddeca5d432dcea2e34a718
Framework: Forward port the ability to enable/disable keyguard with Profiles

This commit adds a few missing pieces needed to support the bypassing of the
keyguard via a profile

Change-Id: I557b80e6de62687b05c434a31083c331127a0398
Framework: Forward port Battery light support and fixes

Change-Id: Ic81d3ffb7548c7b7e34ffecd2f9db781f13b705d
Underp public API... again

Change-Id: Ibb8d74cec9de3c2227451d33f3fe4ce82a731514
Remove power widget background

Change-Id: I314642782525fc441a651cc2b48b227f663dfeed
Underp the Underp public API... again

Change-Id: I7841c3c4d58dc224dc0e83f46b06cb1de93987a2
Merge "Remove power widget background" into mr1-staging
Port "Bind VolUp+VolDown to toggle the ringer"

Squash of http://review.cyanogenmod.org/#/c/20256/ and
http://review.cyanogenmod.org/#/c/22716/

Change-Id: Ied3767969482a7ea44f7f0e9222a2f78fe8f507c
AudioService: Don't adjust volume when vol-downing to vibrate or silent

Pressing vol-down to vibrate or silent would (previously) still adjust the
stream volume, setting the last audible volume to 0, which is not allowed
for voice-capable devices.  Thus, the last audible volume would reset to
default on reboot if on vibrate/silent or the lowest volume setting.

By not adjusting volume when vol-downing to vibrate or silent on
voice-capable devices, the last audible volume is always preserved across
reboot.
Prevent scanning during DHCP process

Wi-Fi should be in active state during the entire DHCP process, and
shouldn't go to IEEE 802.11 power save mode. If the framework requests
scan during the DHCP process, the Wi-Fi chip has to start scanning
on channels different from the current one, and going to power save
mode is a prerequisite for scan. The result directly impacts user
experience: DHCP process takes longer, and even can fail.

Change-Id: I8171388bb70072e4c42cb3c074dd955da84e494b
Telephony: Add getLteOnGsmMode() method (1/2)

Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property

From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
- Moved getLteOnGsmModeStatic() to TelephonyManager.
Merge "PackageManager: fix app lib migration for device with /datadata" into mr1-staging
Merge "Allow mounting of multiple volumes via mass storage (framework part)" into mr1-staging
fix airplane mode in profiles

switch from Settings.System to Settings.Global

Change-Id: I2e719ba881dc192ce5695edafc47e48f1122f3bb
add bools to overlay for Samsung CDMA SMS decoding hacks

ported from CM7/9/10

required by : http://review.cyanogenmod.org/#/c/26918/

Change-Id: I28093cdb8770f98b94cedbff63e6121c798cf9af