Bluetooth: Modify Avrcp 1.5 implementation to adapt to latest AOSP changes

Modify Avrcp 1.5 implementation to adapt to latest AOSP changes.

CRs-Fixed: 719567
Change-Id: I0958fb12f573054f1da16df0ac46f3bec7374222
Add a null check in exifParser to avoid crash while setting Wallpaper.

For some images, while setting as Wallpaper, the src array in
System.arraycopy was null in exifParser, which leads to crash.
This change adds null check to the array used in System.arraycopy.
Also, a safe check is made to ensure start index is not negative.

Change-Id: I46a16b6943aaeeb2395e335bf3926988b881be7a
IndexOutOfBoundsException observed 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: I1302e6b88a3e94249f811fe682f1b0944b5d4e8a
Changes for supporting UICC feature

This will add one more string resource for the devices
which has UICC support in settings->storage option.

Change-Id: Ib4939e45efa87b398294f200dd45cf8bbe3a7a34
Ims: Send user selected TTY mode to lower layers.

Irrespective of whether TTY device is connected or not
send TTY mode setting to modem whenever user changes it
from settings.

Change-Id: I45d2a65840cfb4736cfdcf851357850bb6330693
CRs-Fixed: 698661
ExtMediaPlayer: Increase parcel pool size to 30

Increase MAX_NUM_PARCELS to 30. This is to handle
parcel override issue when textsamples are sent at
a fast pace from mediaplayer.
Usecase: With CEA CC streams, dashplayer sendTextPacket
embedded in each video sample as soon as decoded.
No realtime offset delay sync logic for text samples
as with A/V samples. When samples drained in batch,
can have more than 5 textsamples sent in flurry

Change-Id: I4c4c63b9c9c296dbb387c4da9e70c040b75f92b6
base: Enhance Web URL pattern

Support recognize Web URL without space prefix and postfix with
Chinese characters.

Change-Id: I03bf0afa57a031050e66dfdca2dd341d84a6b996
IMS: Unsol TTY notification support

Code changes to support UNSOL_TTY_NOTIFICATION handling.

Change-Id: I8936b041be1de86faf32455841529d90e1cf6044
CRs-Fixed: 723155
MSim: Add support to enable/disable mobile data

Extending mobile data api's per subscription

Change-Id: I5f411ab9a986130313181fcd936bc909b07ad2fb
Fix for maintaining proper simState across subscriptions

Change the condition to update the subscription
information based on slot Id once the subInfoRecords are loaded.
Update the subscription information and the sim state based on
the previously stored subscription information rather than
invalid subscription.

Change-Id: Ia31784781d6e7f6a82665c40cd10cb557fe6b018
CRs-Fixed: 721525
Bluetooth: Fix for hash map table entry for Advertisement

Addition of callback to the hash map is been decided based on the
success of multi advertiser callback i.e advertiser callback will be added
iff the advertisment is succesfull.

Conflicts:
	core/java/android/bluetooth/le/BluetoothLeAdvertiser.java

Change-Id: I90e810fdee944c1a82729bdf7fcd9ed26f5eb094
CRs-fixed: 721903
Telephony: STK CC feature implementation

Add strings and constants required for stk cc feature

Change-Id: Id5ec987cdc8dc2d9eebdf01fe546eb96ec0c69f9

Conflicts:
core/res/res/values/strings.xml
Change-Id: Id5ec987cdc8dc2d9eebdf01fe546eb96ec0c69f9
MSIM: voice/sms subscription related API changes.

 - Add APIs to get/set the default sms subscription
 - Add APIs to get/set Voice/SMS prompt mode status

Conflicts:
telephony/java/android/telephony/SubscriptionManager.java
Change-Id: I7f06a1f45d59c617e07c1b142a11828f7cda944b
Add Manual Provisioning Support

* Add status variable in SubInfoRecord.
* Add new APIs in SubscriptionManager to activate/deactivate sub.
* Add new APIs to get and set subStatus.

Conflicts:
	telephony/java/android/telephony/SubInfoRecord.java
	telephony/java/android/telephony/SubscriptionManager.java

Change-Id: I8098c46ced297cda748946caab86a5010cc0a255
Telephony: Implementation of DATA+MMS

- New base id for DdsScheduler async channel events

Change-Id: Ib5c4cae7b8471a8d0d2230354eb7cf2ea315ee67
Telephony: Screen status support for USAT phase 2

This fix has change to support Idle screen status information.
broadcast CAT_IDLE_SCREEN_ACTION Intent when ICC has requested
to be notified of Idle screen status.

Add RECEIVER_FOREGROUND flag for idle screen broadcast intent.
Normal priority broadcast intents get queued up in application broadcast
queue, if BOOT_COMPLETE is not yet received by the application.
Adding FLAG_RECEIVER_FOREGROUND to the intent allows it to be delivered
to the application without waiting for BOOT_COMPLETE.
This is necessary to prevent some GCF tests from timing out due to
delayed delivery of CAT_IDLE_SCREEN_ACTION to Stk application.

CRs-Fixed: 432647 454835 635236

Change-Id: Ie42e5249940032fd1fb71b903586ac873174f3c6
Conflicts:
services/core/java/com/android/server/am/ActivityManagerService.java
base: Fix the problems for runtime overlay.

 - There is no need to make the string blocking when adding the asset path,
   as it will be made by the resources.
 - After adding the overlay path, it also needs to update the string blocks.
 - Scan all the sub folders for framework overlay res.

Change-Id: Iaad019111ae364c319e58dce57dbf4647b38d4c3
Mms: Add interface to support sending sms with origination port

Can't use DM test server query DUT's register info with origination
port.
Add 'sendDataWithOrigPort' interface for sending data with IMEI through
origination port.

Change-Id: I270acf1da9f7a68e19433d7eb3953d53097070ee
QuickBoot: add execption restore mechanism

There may be some exceptions like battery unplugged When device
is put into QuickBoot mode. Then device will be in airplane
mode after next boot. We don't want such kind of things happen.
So start restore task to check if need restore before main
screen shows.

Change-Id: Ie92f688d135098972624b21dc69a771fcc39b49f
Conflicts:
services/core/java/com/android/server/wm/WindowManagerService.java
IMS: Addition of Extras to ImsCallProfile

Adding EXTRA strings to ImsCallProfile to
support the follwing Call Extra information:
- Parent Call ID
- Child Number
- Codec
- Display Text
- Additional Call Info
The strings will be used to pack corresponding
information in the mCallExtras Bundle

Change-Id: Ie7a40f5d818eb17ebafdac8c0616e6acf532e27a