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
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
SystemUI: Add emergency call button in lock screen

Add emergency call button in swipe lock interface.
Update emergency call button after inflating bottom area view
and configuration changes.

CRs-Fixed: 736263

Change-Id: I7d4090da74e164647dd3ab927c40398de0f40a92
SystemUI: Update cast tile when wifi display status changes

Cast tile in quick setting does not watch for wifi display status changes.
As a result, it will not update when wifi display status changes.

Register a broadcast to watch for wifi display status changes as settings
and update remote displays when wifi display status changes.

CRs-Fixed: 718032

Change-Id: Ib2ca4677be91817c007db941531849bbc7eff5d3
AudioService: add STREAM_DTMF to stream affected by ringer mode

-STREAM_DTMF volume muted when phone in vibration or silence
 mode but will not restore when back to normal mode by setting
 STREAM_RING volume to 1
-Add STREAM_DTMF to the list of stream volume affected by ringer
 mode

Change-Id: Ib91d6b2c09e10b5cd86ae192cf334c69884da294
CRs-Fixed: 549908
Keyguard: Fix crash in widget pager

Systemui crashed during automatic test, due to NPE of currentPage.

Add null protect for currentPage view.

CRs-Fixed: 715102

Change-Id: Ia1ac67a28fc3aeca6395200adc3448923775164f
Mms: Fix mms Null Pointer exception when running monkey test

InsertionHandleView dismiss again after onDetached()

Dismiss only if PopupWindow is showing.

CRs-Fixed: 713460

Change-Id: Ic60443b9e557184031678516dc3665bf61b78bf7
SystemUI: Add Chinese string for usb charging notification title

Lack Chinese string for usb_charging_notification_title.

Add Chinese string for it.

CRs-Fixed: 667261

Change-Id: I254c5eccbd502bdb2b54018bfeaa14f1c55c1b61
Support SD card absent indicator

Change-Id: I7c08b86b7ae5e05ac9fce305928ea99099c6e938
Support alert type profile default:Vibrator & Ringtone for settings.

Change-Id: I9e2c1efdfabc0ffa0e9cf44cee31781f15e8894a
ChooseTypeAndAccountActivity: Fix the Null pointer Exception of monkey test

ChooseTypeAndAccountActivity crashed during monkey test, due to Null
pointer exception occurred.

To fix this issue, Add Null pointer check before we use it.

CRs-Fixed: 478250

Change-Id: Iae3e331edfda238ecb0c6d5d32b15329b1dfee0b
Add ifdefs for QCOM-specific features

Change-Id: I6e140e0dab9f2ce929c356f9c486309bb7e23099
Revert 3 commits due of other integration from CAF

Change-Id: Id819d434cab35a4eaa993db2af16e900330cb51d