[1/2] Base: Hide power menu on lockscreen

Adds an option to enable/disable power menu on lockscreen.

Conflicts:
	core/java/android/provider/Settings.java

(cherry picked from commit 2a9227f4a356feb67a3e66c51785e40e1a759c41)
policy: only disable power menu on secure lock screen

(cherry picked from commit 00309fe04647da7b178f1616f5faff47cde08465)
Hang off call by power button while screen is on

Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

(cherry picked from commit 57f689809f85dc1646cf95d09d04dad044ade4dd)
PackageManager: allow build-time disabling of components

Allow components to be specified as disabled at build time
(applied on boot).

This allows stock OTA components to be marked as disabled in
CM builds.

Change-Id: I6e4499cc40a779792a5ea97a10137399dad7d69f
(cherry picked from commit 9eba190c1809412535926e774274ad34ec92c14d)
SystemUI: Ensure that the Clock is actually enabled in IconMerger

to device if we need to calculate

Change-Id: If12b0e26b32f044f1a82cf8b539283194d1d0b4c
(cherry picked from commit 39ca2c030c79d0c14740eb1ec496934a68b99983)
Revert "Disable notification count on status bar"

This reverts commit f4f5dce56d3ef93cdb6b4c475b2f598e2a5e26de.

(cherry picked from commit bb9bbb159bff9f67a76406e995322895df54c2cc)
systemui: Forward-port notification counters

 * Port from CM11

Change-Id: Id9d0954acffd00bdb470b9eccbdb3b45fbd995c1

Conflicts:
	packages/SettingsProvider/res/values/defaults.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

(cherry picked from commit 61f34d81beda96905fccfa4586e1237d757c95d6)
ExternalStorageProvider: String mismatch with system language

Text of phone storage does not change when locale changes.

Obtain the string each time by querying the database.

CRs-fixed: 739290

Change-Id: Ic6f5292f8eef9c9438e80fa876b8f276f21e26c8
(cherry picked from commit 07a2e11d58a79b5a03b9e8c7603e67df2b44dd21)
tethering: update connectivity intent

use immediate intent in place of delayed in order to
react promptly for underlying network changes.

Change-Id: I387d5dff7dfca01094177518a5936c6e600081f6
CRs-Fixed: 752832
(cherry picked from commit 4d391a40073759110a2af6191d64afc6ac4dcd53)
UsbSettings: Add UMS mode support.

Add Usb Mass storage mode support for Android device;
Fix SD card can not be mounted to device when usb cable
is plugged in or unplugged fast and frequently.

Change-Id: Iff6de6b1b3e066f4a4ab610ae3fe10b22f5b0822
(cherry picked from commit c0f2032bd5e38ac28e5e3edad23a21d25defef3b)
UsbSettings: Adjust UMS mode code logic.

Not to update UMS status in every iteration of client listener.

Change-Id: I5fbc0145c798c468f2ae943b251700f1a71e00d8
(cherry picked from commit e696aa627f8fb6a228e4297c7f85e3e9ea08aaeb)
Make sure emulated storage path index is 0

MediaProvider blindly assumes that path index 0 of the array returned by
StorageManager::getVolumePaths() is the emulated storage.
However, this is not true when you have multiple users.
This patch modifies StorageVolume::getVolumeList(). to make sure that
assumption is always true.

Change-Id: I4650478274a87adfed91fe53097c1e47fb2f10c7
Signed-off-by: Fernando Guzman Lugo <fernando.guzman.lugo@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
(cherry picked from commit 876316d34b892eb6a520601e41d62668e1290465)
ExternalStorageProvider: SD card's name in Document UI is unreadable

The SD card's title used in Document UI is storage volume's user label.
some times, storage volume's user label may be null or something that
is not human readable, in this case, descripition will be much better
than user label.

If we could get a non-null description, use this description as title.
Otherwise, use storage volume's user label as title.

Change-Id: Ie1adc6ff39293642ebb72d45d8896a273c515205
CRs-fixed: 740100
(cherry picked from commit d50b66ea2dbf90a2ee58ec708254b8d38fa57170)