Make sure that items are visible

Sometimes item is not visible in messaging recipient in landscape mode.

Change-Id: Icc96fe25fdba0d52aa3d4a62009b8a2e8b68a0be
(cherry picked from commit ec2bad7ee7be2d75411b03743e481669537e1e33)
SystemUI (MSIM): Fix Airplane mode toggle issue using Quick Access menu.

onAirplaneModeChanged() in QuickSettingsModel class needs to be called from
MSimNetworkController class (for MSIM) to update Airplane widget in Quick
Access menu. Same code is missing in MSimNetworkController class.
Add notifySignalsChangedCallbacks() at MSimNetworkController class.

Change-Id: I214f679b377f26fb58b6165a52c5e12c860f5111
CRs-Fixed: 543170
(cherry picked from commit 8e06f905ae121509c82dc16d58e93cc86be812eb)
framework/base: Create surface based on the panel orientation.

  - Create Surface for boot animation based on panel orientation
  - Set the display projection values based on panel orientation.

Change-Id: Iaf66ac13cc44cf7910ff150b3a104eb52bcefdbf
(cherry picked from commit 2df2fb787047762464447b77b8fe58c1ce44a428)
server: make clat interface name public

modify clat interface name from private to public

Change-Id: Ib937c1dd7b4bc215fba57703fc2f4d694b336e6f
CRs-Fixed: 536223
(cherry picked from commit 43a76564f0a2771f4a09ba86edefec3fc66badbc)
(cherry picked from commit 0448fd4b63a179c953449c3e8b40345eec9727b1)
(cherry picked from commit cbde0fcd3fb6882f0572afb3200e122a4d30d909)
(cherry picked from commit aa4f129db02ae737f24db5ee5059f0c77e3c0a00)
Add CAP_BLOCK_SUSPEND Linux capability to system server

Add block suspend capability to system server to allow
system server to hold wake locks in more recent Linux
kernels.

Change-Id: If37e6b3db43cde6b185e699926a940f6717aa05b
(cherry picked from commit 51c726fedef49b0b091c27bb90de4eee3083e00b)
Reduce total number of background apps for low memory devices

Due to memory constraints, we anyway cannot fit the default number
of BG apps. So instead of killing background apps to
free up memory when launching, start with an already
reduced background set of apps.

Another side-effect is that launch latencies also improve.
This change is for low memory devices. (512MB RAM or less)

Change-Id: I9de0cb1734c0a386fc47cde71723e5c16825f5a3
(cherry picked from commit 0c6449bd870684c0bbaeb33643543b99a11c3b43)
frameworks/base: Update timelapse quality check

Updated timelapse quality check to include WQVGA

Change-Id: Ic2ef9ad78cbbc2daa14ff5e95ff3cfb6e10a7529
(cherry picked from commit f367575800a7a499ae036773bf78a066f09e7a3a)
libmediaplayer: update MIME types to include DASH support

Update MIME types to include DASH support

CRs-Fixed: 539815
Change-Id: I300e3bec1425ec1e1170bd489097237218c52baf
(cherry picked from commit d5513e0b4519808af90ed6e22ebdcbe1102187f8)
When mInputText isn't on focus, hide the soft keyboard

Flash english keyboard quickly when press selected the
number of the date of each month in data usage

Change-Id: I0d2cbde1a72a575b009a2d84d2e020ad101ce5a3
(cherry picked from commit 1796f5a57eb2f4fd1ae18cb5a8b8135b8332647e)
DialogFragement: Add null pointer check for mDialog for protection

DialogFragement can be dissmissed just after the Dialog is
established. This will cause NullPointerException.

Add null pointer check for mDialog for protection

CRs-fixed: 549689

Change-Id: If57f81d03a8ec2906598363b681ea38806fb2a90
(cherry picked from commit 08294d27350bc782a65ec3cc75d6bdea182dd13a)
ChooseTypeAndAccountActivity: Fix the Null pointer Exception of monkey test

ChooseTypeAndAccountActivity crashed during monkey test, due to Null
pointer exception occurred.

To fix this issue, Add Null pointer check before we use it.

CRs-Fixed: 478250

Change-Id: Iae3e331edfda238ecb0c6d5d32b15329b1dfee0b
(cherry picked from commit 6c8a528e1e66b6e979277b985e3c7a7566e63940)
Bluetooth: Fix to avoid object leaks during BT OFF

A case where script is running to do BT ON/OFF 2000 times,
Each time while turning off BT FULL_CONNECTED_ASYNC_CHANNEL
is disconnected by Pan Service. HALF_CONNECTED_ASYNC_CHANNEL
is not disconnected, which leads memory leak in Pan Service
object as messenger passed by PanService & ASYNC Channel object.
which are still referred from BT tethering framework code. So GC
does not claim for these objects. HALF_CONNECTED_ASYNC_CHANNEL
should be disconnected, once FULL_CONNECTED_ASYNC_CHANNEL
is disconnected to solve this issue.

Change-Id: I5a7a2beb0169a755cf4f3f37fd0a0ab7d08fd9e5
CRs-Fixed: 591180
(cherry picked from commit a37a4b1e871801c2060b6582582a97f6285b2a30)
 Audio: SetForceUse config check in AudioService

 - Audio is routed to headset when BT is turned off while audio is
   played on speaker
 - Mediarouter does not have setForce device information when app forces
   audio to speaker. So while disconnecting BT, MediaRouter is routing
   audio to headset instead of speaker.
 - Added check for setforce config in AudioService.

 CRs-Fixed: 578316

Change-Id: Ie929f407bfa12eacd29cf36031024a4a6a979b63
(cherry picked from commit d17b5bb245c2e30c1aeb083912c968679424edc2)
Mms: Fix FC issue that when tapping contact icon many times

Add protection to check the extra string info from bundle before making
the URI, to avoid null pointer exception.

CRs-Fixed: 534089

Change-Id: Ie8c78ca42c290e16afa1fefeb01ea67c8e963b06
(cherry picked from commit 3cf754c4703d6294a48fb51d48e0b2fb5fbf1072)
QuickBoot: don't wake up screen when usb connected

Don't wake up screen in QuickBoot mode when usb connected.

Change-Id: If65936a0edbbc3b36a0768294e5c3bd7d741018a
(cherry picked from commit 8b088ded88b8e80bda6fae5e04bb676371255f42)
framework/base: Handle P2P-REMOVE-AND-REFORM-GROUP event

Remove P2P group on receipt of P2P-REMOVE-AND-REFORM-GROUP event from
wpa supplicant and then reform new P2P group if autonomous group is
set to true.

Change-Id: Id6fbf2c2ebbebc06afc70cf56a7b434eb8ab2eea
CRs-fixed: 531882
(cherry picked from commit e93615b61197edceb2ea0ffb45d97b2503b460a5)
wlan: Fix to handle the failure status on supplicant start.

WiFiController shall enter in to StaEnabledState state after the
request to start supplicant irrespective of status being success
or failure.Thus,any new attempts to turn on Wi-Fi later shall
fail as the controller statemachine is expected to be in
APStaDisabledState to start Wi-Fi.
Thus , start the supplicant on a command CMD_WIFI_TOGGLED in the
StaEnabledState if the current WiFi state is neither
WIFI_STATE_ENABLING nor WIFI_STATE_ENABLED.

Change-Id: If4c4913b608411bac334f9c201441aaf36d7675b
CRs-Fixed: 570305
(cherry picked from commit 1c4810cdb99893b00553a7c019ddffa54a3612c8)
Revert "Add support for BeiDou and Glonass"

This reverts commit 9c3c49b082916f83f4ced99ae81647e5c3fc1202
since it picked up the wrong patch for merge
CRs-fixed: 582614

Change-Id: I6e1d45856fa26d470209396980f46ea13e5041db
(cherry picked from commit 3b0b0332c739560509a19d592d673097a4c11703)
Add support for BeiDou and Glonass

Add masks for BeiDou amd Glonass
to delete aiding data
CRs-fixed: 582614

Change-Id: I651adcf4f5486c827bea8487e3437f15cd6d8013
(cherry picked from commit e1d4cc49a4b41d617ba79dfde90560fc4053f0d9)
framework/base: Do not kill the supplicant on a request to stop it

Supplicant is killed on obtaining the first TERMINATE event when
requested to stop from the framework. This shall result in improper
shutdown of the supplicant without proper cleanup of the resources
allocated for all the interfaces.
Moreover, there is no point in killing the supplicant when the
request itself is to to stop the same. Thus, do not kill the
supplicant on the TERMINATE event.

Change-Id: I954bb09faa94252eea53a14b090a6cff610c5964
CRs-Fixed: 601759
(cherry picked from commit 7ea542adb91e98b198280681d87d3e45f82704e4)