Bluetooth: Catch RuntimeException while setting system property

Add change to catch RuntimeException while setting system property
to prevent crash in bluetoothShare, if we are unable to set system
property during BT on/off stress test.

Change-Id: I3e89569639d4ecbd94fe805ab2350a259f4fec68
CRs-fixed: 627455
Bluetooth: Update Current Track and Total Track number.

Add correct values for current and total
track numbers in meta data

Change-Id: I806c8d913818e8e5a1ecbe1641ea4ed87e3ee3c7
CRs-Fixed: 627869
Bluetooth: Making Intent for pairing in foreground.

During BT ON when headset is previously connected and second
device is trying to pair, Intent ACTION_PAIRING_REQUEST is
not received by application in time.
Changes made to make ACTION_PAIRING_REQUEST in foreground.

CRs-Fixed: 612574

Change-Id: I6b98fbb73a1b1f2d1794f02713578d24988e456f
Bluetooth: Free bd_addr in avrcp getRcFeature callback

Free bd_addr received in avrcp getRcFeature callback to avoid
JNI local reference table overflow Error in AVRCP JNI.

CRs-Fixed: 630129
Change-Id: I4f98adbbc23516dd2887b263e0128cdf183b2280
PBAP: Acquire wakelock on incoming connection

Acquire wakelock on incoming connection to make
the screen active. It was done so that the user
can reply to the connection request if the screen
is OFF on incoming connection.

Change-Id: I4dfc217cbdd7a55ec43172dd8236ee197207224d
CRs-Fixed: 634130
Bluetooth: Map: Bug fixes on Map Code.

Add bug fixes on MAP code to avoid null deferences in erroneous
scenario.

Avoid null dereference during a case when emailBody is null and getMessage
operation is performed for that email handle.

CRs-fixed: 620282

Change-Id: I4066daf88251452a21b97292817d49232c70dd76
Bluetooth: Looging for A2DP

 - enable logs in statemachine and a2dpservice

Change-Id: I9fc6c06f091544d9cacfc6690c875557c65b1599
CRs-fixed: 601894
CRs-fixed: 601893
Bluetooth :Fix to avoid the access of JNI gloabal reference object

This is a conrner case where bindandfinish gets called anytime
where adapter state!= STOPPED and calls cleanupNative. Further
while cleanup at lower layer will try to access JNI reference
which is already deleted.

Change-Id: I579bc4015b61ad653f18a5f4a3d26a2508236ff5
CRs-Fixed: 642466
Bluetooth: Allow A2DP Src connection while connecting other profiles

 - allow src connection while connecting other profiles for
the first time

Change-Id: I476760480e142ca5af6bea078bfdfb093b92beca
CRs-Fixed: 627137
Bluetooth: Map: Add support to add CC list recipients in get Message

As per the present map profile email implementation cc list is not
displayed in getMessage response. Add support to send recipients in
cc list of email on getMessage response

Change-Id: If09a245f18f3727ec678308a46d0a43cd2abf0bf
CRs-fixed: 635778
Bluetooth-OPP: Avoid calling incoming notification if already notified

This change will ensure that incoming notification will not be shown
again if its already displayed. Otherwise, if there is an ongoing
transfer updatenotification thread will be called every 1 sec which
will update the pendingnotification even if its already notified.

Cleaning up Tx/Rx sessions if user abort occurs. Otherwise, cleanup
happens only transfer is successful this may cause Tx/Rx failure.

CRs-Fixed: 653842
Change-Id: Ifc1335849914f3032459117836473e0cd443060f
Use round() instead of ceil() in calculation of a2dp vol slider position

The avrcp MESSAGE_VOLUME_CHANGED requests volumes in the range 0-127. In
convertToAudioStreamVolume() this value is scaled to a (typically much
smaller, e.g. 0-15) integer value representing the volume slider step to
be presented in the UI. Depending on the resolution in the volume
requests from the a2dp device and the resolution of the UI volume
slider, some of the requested volumes might be mapped onto the same
UI slider positions. If ceil() is exchanged for round() in
convertToAudioStreamVolume() the problem with double mapped volumes
vanishes in most realistic cases.

Change-Id: I89d9ac4b8c330fd4fd2a02984bd628961f2cb035
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Bluetooth into HEAD