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
frameworks/base: Fix to avoid UI freeze issue.

Due to some race condition in WindowManagerService, Screenshot
layer remains as topmost and buffers are not flipped hence
no updates seen on the screen. So, trying to destroy persistent
layer explicitly if freeze timeout expires 6sec.

Change-Id: Ibe295550a7431a4f633a57e7dfab0cbda102ab87
Allow device to enter download mode on framework watchdog

This allows to get better insight of the device state at the
time of framework watchdog

Change-Id: Id62ab5c156793a91161770cd4ed388b3783a1960
ContentProvider: Use the mode the use chosen from the dialog

When the user try to delete contacts, we will show a dialog
to let the user decide whether the app can do the delete
operation or not. This issue's root cuase is that we did not
return the result we get from the user's choice.

Return the mode user has selected instead of the default mode
when we are checking the app's permission.

CRs-Fixed: 750841

Change-Id: I53355d6ff367fcc88330e39986d0a7fd7896861c
USB: AppOps: always show "USB connection" when usb connected

If no mode is choosen, "USB computer connection" will be hidden.
Unfortunately, there is no default mode, so users can't find it
by drag down statusbar. For better user experience, we export it
to users when usb connected.

Change-Id: I486e1a012f12f81f5a79d5f3686db58f980c0890

Conflicts:
	core/res/res/values/slim_strings.xml
DocumentsUI: Fix download status was displayed incompletely

The layout arrangement of date, size and summary are unreasonable.
Text was ellipsized when summary has too much characters.

Reconfigure "layout_weight" of date, size and summary can fix this
issue.

CRs-Fixed: 619201

Change-Id: Ic2db20a303dd1db7e2d3375e4b733d704daf393b
androidfw: Use the last package to create idmap.

Overlaid packages contain one or two package groups, the first one is system
package(android), and the second one is application package. So it should use
the last package group to create idmap.

When inspecting the idmap, similar as above.

Change-Id: I97e0179bc5b5acdcacbe6ec5b5b7c22af51d1d0b
DownloadManager: add to pause/resume download by user

We add pause and resume APIs here to make application can
pause and resume downloads by DownloadManager.

Code change contains:
  - add pause and resume download APIs.
  - add another paused status for this case.

Change-Id: I5bf4f15b2464009595f7926522ca6d5f1b0e2b8d
Download: use "control" column to mark paused/resumed status

Before, column "status" is directly updated when user pauses/resumes
download, this causes status shown to user is not same as real status
because pausing/resuming needs a little time not instantly, and then
causes some status error.

The column "control" is updated instead of "status". When user pauses
download, will update "control" as CONTROL_PAUSED and set "status" as
STATUS_PAUSED_BY_APP until pausing operation is finished; and when
user resumes download, will update "control" as CONTROL_RUN and change
the status as STATUS_RUNNING until DownloadThread is started to run.
Then the status shown to user will be same with real download status.

Change-Id: I2204b972d24b809f7914b0981cad11e9175f4ae6
CRs-Fixed: 737182