MSIM: Add support for cell info

Add suport for getAllCellInfo in MSIM

Change-Id: I9d61723b4c73f595dafd18275532f80a9a6390ff
CRs-Fixed: 654445
IndexOutOfBoundsException observed rarely in ProcessStats

Sometime IndexOutOfBoundsException is observed in ProcessStats
while allocating longs array. This could be due to synchronization.
This fix will return if array index is >= size.

Change-Id: I1df34152c95f2ff61829da07f750e79a6f1efab3
CRs-fixed: 626638
Fix a resource race bug in PathCache

When enabled defer rendering, it will do precache for DrawPathOp.
The paint used for creating PathTask in precache just get the address
of mFilteredPaint of OpenGLRenderer. So for the following defer
operation like DrawTextOp has possibility change the mFilteredPaint
by getPaint while another WorkerThread in PathCache is using the paint
which pointed to the same address of mFilteredPaint to generate bitmap.
As a result, it will generate a wrong bitmap for generateTexture in
PathCache. To fix it, do a copy of paint when creating PathTask.

CRs-Fixed: 664244

Change-Id: I5516f5b143458b88d3573d15b7ebb34f688800c7
base: App crash when select suggestion's length more than specified.

App crashed by catch IndexOutOfBoundsException which raised
by check span range when select suggested string.The root
cause is that the editor will truncate the suggested string
which length is more than it specified, but it also set span
use the suggestion's original length.

Update the suggestion's real length after editor replace the
original string to suggested.

Change-Id: I2d765701934a9e68be172cb87a104590f3cdeceb
CRs-Fixed: 532211
Applications crash observed while selecting words from suggestion list

While selecting words from suggestion list, applications are crashing as
textview span are going out of index. For textinput where spaces are not
allowed length difference shall be calculated properly to avoid Index
out of bound situations.

Change-Id: I360318cf9241abbb7f58ad1ddf3f3c8d364f17d1
CRs-Fixed: 642057
MMS: Fix Messaging will force close after tap one item in suggestion list

The span end is larger than string's length, it caused IndexOutOfBounds
exception.

Check the span end to avoid the IndexOutOfBounds exception.

CRs-Fixed: 555378

Change-Id: Iaf1cbe8db8704b3112afb6207982750b650fe5c5
Fixing IndexOutOfBounds Exception in ActivityManager

Bypass the iteration to avoid the exception during
the execution of ensureActivityVisibleLocked() because
startSpecificActivityLocked() within the loop may delete
the elements from History stack.

Change-Id: I195da10a8e9161572bdb653ad3021998d4f2a939
CRs-Fixed: 651963
base: Add support for FLAG_SUPPORTS_PROTECTED_BUFFERS

For the clients (WFD) which need secure HWC composition,
FLAG_SUPPORTS_PROTECTED_BUFFERS need to be set.
- Define new flag VIRTUAL_DISPLAY_SUPPORTS_PROTECTED_BUFFERS
- In VirtualDisplayAdapter, add support for the flag
FLAG_SUPPORTS_PROTECTED_BUFFERS.

CRs-Fixed: 653794
Change-Id: Ib954943f3e27067b2805188771f951c115833237
audio: Fixed dead lock in AudioService during volume change

- AudioService goes into dead lock when there is a volume
  change for source stream and the respective aliased stream
  simultaneously from multiple threads
- When setIndex is called for source stream, it also updates
  the index for the aliased streams. Meantime, setAllIndexes
  is called on aliased stream. Initially, it gets index of
  default device of source stream. It requires lock on the
  source stream. This is leading to a dead lock
- Fix is to avoid locking parent while updating child
  streams. Removing lock from method and synchronizing
  parent only when it is updating member variable.

Change-Id: Id38e539e2ec178ea25548312a1dd62d2de3043da
CRs-fixed: 635789
Telephony(MSIM): Fix tcp buffersize issue

On a multi-sim device, getNetworkType function call
in getTcpBufferSizesPropName function of
MobileDataStateTracker will return data radio technology
value on the subscription on which data call is
currently active.

Change-Id: I7c36a408cfa090a2801d03f61f86d6d1a148c7c2
CRs-Fixed: 661835
Added validity check for Pointer Index

Checking if the pointer index is valid before querying for X & Y
coordinates. This is done to avoid IllegalArgumentException.

Change-Id: Ic7f3022d33c313a0bfe8b55c9bc89019b33d23b7