SystemUI: Status bar clock - fixes

This commit fixes:

- no overlapping more from status bar icons on center clock.
  The width depending on what the user has setuped (date and clock) is exactly meassured now
- do not start animations if they are not needed
- reduce settings provider calls
- a bit cleanup

Change-Id: I7a37a6ae8f9bad0f265119af05dc20cf21cd6890

(cherry picked from commit 2ae9fcb47639ac1113f89bc28dfbaf5e8b781198)
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 f64a468b12e8c651f6ec8a583633d036932440f9)
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 678917c3ed2b58e7dfbb7852bb243aa47010675a)
SystemUI: make alarm text selector less blocky

It now matches the rest of the selectable items in the expanded header.
None of them had these boundries and neither should this.

Change-Id: I92041ee685a0c16f80c003658abbfd0a6143c07c
Signed-off-by: Roman Birg <roman@cyngn.com>

(cherry picked from commit d54da834ffb34a80a31db7d6cf9aa9e4a72b6f71)
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 d8b7b326ebb8c40e396568fd25f96c9491a60c7d)
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 239e08698405de6257cf74acab52830838334ea4)
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 3acb0560e69085711501af2c2c284abdfb2f7421)
UsbSettings: Adjust UMS mode code logic.

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

Change-Id: I5fbc0145c798c468f2ae943b251700f1a71e00d8

(cherry picked from commit 0107e91568cf3dac04b94d55bd6c2cefa88194c7)
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 79685101701dd1907c13a0082e253b439c169d6f)
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 951dbcbdae83fa2d64e2be45efa9e4034c3510ba)
Storage: Add secondary storage support for app installation

Add secondary external storage APIs for app installation. And
change the logic to allow app to be installed into external
storage.

Change-Id: If2f67af7508d020c1d041bb955e3d55136a34acc

(cherry picked from commit 926b1c3691264d808b8690053c9d3b9f8ad3dfca)
Hide new methods instead of modifying the public API

Change-Id: I8a1b316f70a0dd76eb6c900d9c1a74e8e1765af3

(cherry picked from commit 78e48b31314260f6c683a7f871018dc1916792e6)