Bluetooth: Changes for LPP

This patch includes implementation of a new Bluetooth
Adapter named QBluetoothAdapter for implementing LE
specific tasks that the default adapter doesnt perform.
This patch also implements Low power proximity.

CRs-Fixed: 581289

Conflicts:
	services/core/java/com/android/server/BluetoothManagerService.java

Change-Id: I63e0593f79c8929d4e18cee0472fcb401c8892e7
Wifi: Add a flag to indicate duplicate network

Add a flag to indicate if a wifiConfiguration is duplicate or not
This flag decides whether the previous network history along
with IP and proxy configurations are required to be copied
or not.

Change-Id: I663d985031c82e64f889044441daee70d17e5ddc
CRs-Fixed: 760505
Revert "wlan: Provide runtime option to enable or disable rssi threshold (base)"

This reverts commit b95c030a6ffa22b8c96d5358ee34ed835085a172.

RSSI threshold parameters are now user configurable.Below are the
parameters.
THRESHOLD_UNBLACKLIST_HARD_5G
THRESHOLD_UNBLACKLIST_SOFT_5G
THRESHOLD_UNBLACKLIST_HARD_24G
THRESHOLD_UNBLACKLIST_SOFT_24G
THRESHOLD_INITIAL_AUTO_JOIN_ATTEMPT_RSSI_MIN_5G
THRESHOLD_INITIAL_AUTO_JOIN_ATTEMPT_RSSI_MIN_24G

Hence reverting the gerrit

Change-Id: I0d589cd494a488a4618434314e76fefde1275abd
CRs-Fixed: 757958
WiFi : Fix to DHCP to static IP configuration problem

WiFiStateMachine shall update the IP address configuration to
the kernel through NetworkManagementService.This notification
from the kernel is again sent to the connectivity service
through the NetLinkStateTracker and WiFiStateMachine.
Thus ,if the interface is down during this IP address
reconfiguration (for the case of DHCP to Static IP configuration),
Connectivity service shall be notified with old IP address ,NULL(0)
IP address(signifying interface down) and the latest IP address.
This notification was done by updating the IP address using a local
variable , and hence the second notification on the interface down
is over ridden by the last notification , resulting in missed
interface down notification to the connectivity service.This
resulted in failed data connection when IP address is changed from
DHCP to IP on the fly.
Hence ,this gerrit enhances the design and also pass the updated
IP address to the connectivity service.

Change-Id: I50cd0502c5f8259b1325ed68de870b592d96ae22
CRs-Fixed: 750277
media: Scan FLV files, because why not?

Change-Id: Ia517d3057d843d7306f567cdbdddddd63c472a2b
VideoView: Add logs for video start/stop profiling

Add logs to profile video start and stop latencies.

Change-Id: Ic7f6237ee932a5c07828b1d0010dcb0fd3175411
Move media player list management to Audioservice

Move media player list management to Audioservice so that
list is retained even after BT restart.

Change-Id: Ia2455e6def1900b4af2225c50e1b5325a7ce1a98
Revert "MediaMuxer: handle expection for add track"

This reverts commit 0e57858602657ccbb22d6f592831f6e2547cc4ef

Change-Id: Ia9b4969a660a9816b1698fabd5456400fca84563
audio: fix unresolved link error for javadoc

- Remove @link comments for extended audio
  formats to fix unresolved link error while
  compiling Javadoc
- These extended audio formats are not standard
  AOSP definition and should not be updated for
  javadoc

Change-Id: I34fec0d9709a7def0f92660b6ec0a8e971529161
Telephony: Add a config item to control fetching APN from OMH card

Change-Id: I5c14a6870ea0767cc14ff3addeeb0828cc704a32
CRs-Fixed: 748148
telephony: SignalStrengh: Don't calculate a LTE snr if the srq is invalid

If the previous values are invalid and signal quality is -1, chances are there's
no LTE signal at all, so don't calculate the SNR and mark it invalid as well.

This fixes the strength indicator in GSM devices where it was being skewed
by the ghost LTE value

Change-Id: I070573401c141aa99941a332ee256246697abb90
Bluetooth: Move LE Lowpower proximity to vendor specific

This integrates LE Low Power Proximity changes into PXP monitor
service code and allows changes to frameworks is minimal
CRs-Fixed: 657495

Change-Id: Iaf8a63acdc3b948236560facc70cc63f7012da1e
Bluetooth-Wipower: Enable dynamic logging for A4WP

This helps to enable wipower dynamic parameters intercepted
at host to be logged via adb/command line.

Change-Id: Ibd79f4d56c99a43eab1146f4ae20155ac439cd8f
CRs=fixed: 754356
Bluetooth: Adds check to verify Bluetooth adapter state

This checks whether bluetooth is turned ON or not in BLE
start scan process.BLE scan apis are called from applications
so need to check if BT adapter state is ON to avoid Bluetooth
crash

CRs-fixed: 649274
Change-Id: Ic075e1560bba2cabbfac2e1477932f9ad3144067
Bluetooth: Change userhandle to current from ALL

Change to a user handle to indicate the current
user of the device instead of ALL to avoid the
force close error in bluetooth.

Change-Id: I72e5feba6616a48ef8590b6965ec1d94f27b7dca
CRs-fixed: 742926
Bluetooth: Enforce BT state check during GATT close/disconnect

Enforce BT state check when BLE Apps call into GATT to handle scenarios in which
delayed call from BLE App to disconnect/close comes after the BT is OFF

CRs-Fixed: 759852
Change-Id: Iaf7004cdd4fe52e64c48838f6ed918e1d25f5a1e
Bluetooth: Sync Bluetooth Adapter and Manager Service.

BluetoothAdapter has timeout of 8 sec whereas waittime of
Bluetooth Manager Service has timeout of 3 seconds, case
if remote does not responds to service level  disconnection
then Mangaer Service times out after 3 sec.
During multiuser switch new process is created hence
previous process cannot block ON thus one process is waiting
for timout and other process tries to Turn BT ON leading to
crash.
Fix involve is to have Adapter and Manager service
have same timeout during user switch.

CRs-Fixed: 761698

Change-Id: Ib1590fb2a41f748f36c58ae9ca8916cf68befc82
Frameworks: slim up sounds and update (1/2)

Till now we modified always the aosp make files etc. Was complicated to maintain.
Hence we add now an own slim folder and own AllAudioSlim.mk to mainatin it completely
ourselves.

As well reduce size etc etc

Change-Id: I0d60a0abe0935f1000016bc5d69b4f4e36616941
Merge "Frameworks: slim up sounds and update (1/2)" into lp5.0-caf
bootanimation: allow preload the bootanimation

This patch implements one simple performance enhancement, which
might benefit devices. It is completely opt-in by setting
the following variable.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

Conflicts:
        cmds/bootanimation/BootAnimation.cpp

Signed-off-by: Andreas Blaesius <skate4life@gmx.de>
- picked for L, original commit only applyed partially: https://github.com/CyanogenMod/android_frameworks_base/commit/e6b54405aa70d7503a114d9c90ef7518abdd7133 >

Change-Id: Ie92d1b0aa90b43ba39c368a2a33657a60c3a64b5