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
bootanimation: Only try to shutdown the mediaplayer if it was prepared

The bootanimation tries to shutdown the mediaplayer gracefully by waiting
on an asynchronous shutdown event for 5 seconds.

If, however, there is no boot sound, that asynchronous shutdown event will
never happen and the animation will be stopped for 5 seconds before shutting
down.

Visibly, this fixes the issue where the bootanimation would simply stop near
the end for exactly 5 seconds.

Change-Id: I77f5631368c7d9b9fef7941a6278af9c36032044
Automatic translation import

Change-Id: Ic345066c368f88cb867dbe9f4ed68cc109cb41f2
WallpaperCropper: Fix translation import

Change-Id: I5bc263f4e684bda03f738d2cb1907bd39ef58e44
SystemUI: Ensure that the Clock is actually enabled in IconMerger

to device if we need to calculate

Change-Id: If12b0e26b32f044f1a82cf8b539283194d1d0b4c
Fix lockscreen selection view in landscape mode.

Added a dimen-value for selector in landscape-layout to fit screen. Issue is described here:
https://github.com/LegacyXperia/local_manifests/issues/677

Change-Id: I9501c91fed2660e947f1eae617f9a31d95766ed8
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
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>
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
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>
Tethering: IPV6 tethering support

- Added two APIs addUpstreamV6Interface and removeUpstreamV6Interface,
  required to pass the interfaces to use to the Router Advertisement
  Proxy.
- Added a dun entry to the networkAttributes value in
  res/values/config.xml. This is to allow tethering to work with the
  dunRequired property.
- Added dun to allowable tether upstream type.
- Enabled debug flags for debug logging inside framework components.
- Regardless of MOBILE_TYPE_DUN APN being available, if dun_required
  flag is not set, fall back to HIPRI as a preferred APN for the
  embedded data call.
- Debug logging was enabled by default which was causing security
  vulnerabilities. This patch disables debug logging.
- Added a NULL check for Network info in CMD_UPSTREAM_CHANGED
- Changed the exception type thrown from IllegalStateException to
  RemoteException whenever the IPv6 tethering rules fail to apply. The
  IllegalStateException is not caught by the caller causing the JVM
  to crash. By throwing RemoteException, the caller will catch and
  print and error message instead of crashing.

Conflicts:
        services/core/java/com/android/server/NetworkManagementService.java

CRs-fixed: 665103
Change-Id: Idb0971449473554bcd749d478563db7ba351d55d
Broadcast upstream interface change event independently for IPv4 & IPv6

On change in tethering upstream interface for IPV4 or IPV6 address,
broadcast an intent with the information viz iface name, ip address
type and update type(i.e add or delete).

Change-Id: Ia80738bcf09692209674a47b6c6c1c082a201b16
CRs-Fixed: 680728
Broadcast upstream interface change event for IPV6

On change in tethering upstream interface for IPV6 address, broadcast
an intent with the information viz iface name, ip address type and
update type(i.e. add or delete). This changelist is update to
Change-Id: Ia80738bcf09692209674a47b6c6c1c082a201b16 for IPV6
tethering support.

Change-Id: I2e3da6e6b881ef1eb0f673c8d293f10c250ccd93
CRs-Fixed: 721222
SOFTAP: implement SOFTAP new requirement in framework

If framework recevied the STA (dis)connect message from netd,
it will try to read device info from dnsmasq and broadcast
an state change event via intent.
Meanwhile, framework will maintain the conneted Sta list which
can be access from upper layer.

CRs-Fixed: 685913
Change-Id: I61bfb48a9ac51371995b1992b966be6e18633828
Forward Port: Volume button seek on screen off [1/2]

PS : Fix the short press event type

Change-Id: Id55a1240a133b5144502fced862bae040b390662
Frameworks: fix some icons (1/3)

Change-Id: I1369d1413fb22f64d0040ec634cc7e8f938ad3fe
Framework: StatusBar Ticker (1/2)

Change-Id: I6135297792c7b42172e08e14acd37b252cb00102