Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345

the handleRegistration will never run after we shutdown the handler thread first,
with this change, we can make sure the mObserver will never be null
when call handleRegistration.
bug:11148404

Change-Id: I93b351915b49cf59a7d2026b7d83a68a7e76dd38
Change pairing api/intent permission from PRIVILEGED to ADMIN

The APIs are createBond, setPin, setPairingConfirmation
The intent is ACTION_PAIRING_REQUEST
bug 11101076

Change-Id: I3b065ab0348a964bb557e57527491b2f34e68a81
Merge "Change pairing api/intent permission from PRIVILEGED to ADMIN" into klp-dev
MAP: fix problem with MNS not disconnecting correctly

MNS is needed to disconnect with the MSE but did not.
This patch fixes that by re-adding a disconnect() that was wrongfully removed during review.
Patch set 2:
-----------
 - Split disconnect and shutdown for MNS connection
bug: 11161674
Change-Id: Idd09fc774584dfdb171b0d00be0f7711ae57b853
Import translations. DO NOT MERGE

Change-Id: I75b1aeb7c88fa9a3c678f91a2d88a95fa63f80df
Auto-generated-cl: translation import
NPE in bluetooth MAP cause bluetooth process crash

bug:11448104
Change-Id: I30045162c89e2150a9ef476f33e1b322e7cc9a44
FF/REW is not correctly for AVRCP.

While a music is being played, if FF/REW is pressed on the connected device,
it remains in the FF/REW state constantly (on the Porsche / Audi A8 carkit)

bug:11377223
Change-Id: Iee5468308f2786839c3a047c95dfa0a49ef28efb
Merge "NPE in bluetooth MAP cause bluetooth process crash" into klp-dev
Import translations. DO NOT MERGE

Change-Id: I5ca5b6507989bc70ccc1cb5790e9a5b8b45caeb4
Auto-generated-cl: translation import
Handles AT+BVRA=1 received during an open SCO session.

Bug: 11072505
Change-Id: If665517cd9efa087154edd57b23163e7cc098f6f
Merge "FF/REW is not correctly for AVRCP." into klp-dev
cancel device discovery before start pairing process

During pairing process, SDP search is needed which cannot be handled
if we are doing device discovery
bug 11294130

Change-Id: Ic025fa3000af4f2d4c2c2ac411d26b6a99ad097c
Merge "cancel device discovery before start pairing process" into klp-dev
LE: Fix stack crash on invalid descriptor write request

Fix stack crash when an application attempts to writes a NULL array
using the writeDescriptor() function.
bug 11574019
Change-Id: Id2d7e49216fcc6e3af369047005fb7e67e0923db
Merge "LE: Fix stack crash on invalid descriptor write request" into klp-dev
Always follow the user's preferred contact display name format.

Change-Id: I46847530b7c8156741a5a03f0080b23162cf248d
Added support for Filter parameter for PBAP function PullPhoneBook

VW Premium car kit sometimes behaves strangely if it receives entries with unexpected fields.
E.g. it does not like mail addresses with additional attributes.

Change-Id: I6d3145d802ad87e5fb47217a213f9bcb12670f60
Signed-off-by: Martin Gerczuk <admin@android-rsap.com>
remove a read lock to work around a platform deadlock problem.

remove the lock in getStatefunction to work around a platform
deadlock problem.and also for read access, it is safe to remove
the lock to save CPU power

bug:11655066
Change-Id: Iddc0ada04010d95ae7d5fbc93ab837ebfc025b7a
Merge "remove a read lock to work around a platform deadlock problem." into klp-dev
Bluedroid: PBAP: SIM Access support.

This patch adds access to support SIM database.

Change-Id: Ica2e3a5c9203634814c0f4063d3f4ab99ff080f5
CRs-Fixed: 509165
(cherry picked from commit 4bb632dc0a745833a3850cac1cbef50eb6f7467f)
(cherry picked from commit dcd8f79ca0b9f156bacfdec105c83f7cc321db4a)
(cherry picked from commit f9e4c8cfb76aba8b108342a5243d825ee42c6e35)