frameworks: add dock battery drawables for HDPI devices

Change-Id: I8cc2cfc74548693ffbdd48447d7fa414fd451f59
CircleBattery: Revamped charging animation

Youtube Video: https://www.youtube.com/watch?v=nztroKnBDPs

Patchset 2: removed obsolete mPaintAnim

Change-Id: I629614497fc47d96eda03912d5dac4d6dd2ed0df
Possible NPE in ChooseAccountTypeActivity

Change-Id: I8d36717cc9b74f62ac90eae22225424f57fb9d05
Possible NPE in ActivityManagerService

Change-Id: Ib3effa9b2dc371b0678b9cf645d4c927684c01d1
Possible NPE in RuimRecords

Change-Id: I3ac7754ce18b540325e09e0bdcfff926239c8240
Copy-Paste bug in IconUtilities

Change-Id: I9c48d9e4682e1322d22b13be02d9214755685274
LocationManagerService: The "value" was used as a Map.remove(key) method parameter.

Change-Id: I83679d41576c609a7f7e0556c36df796666c1f59
SQLiteSession: Use hasNestedException() method instead of direct check

See: https://android-review.googlesource.com/#/c/45433/

Change-Id: I2e025b249cc1c487116fc4abadaf9326b1f98563
Merge "Possible NPE in ActivityManagerService" into jellybean
Merge "Possible NPE in ChooseAccountTypeActivity" into jellybean
Merge "Possible NPE in RuimRecords" into jellybean
Merge "Copy-Paste bug in IconUtilities" into jellybean
Merge "SQLiteSession: Use hasNestedException() method instead of direct check" into jellybean
Merge "CircleBattery: Revamped charging animation" into jellybean
Merge "LocationManagerService: The "value" was used as a Map.remove(key) method parameter." into jellybean
Restore correct volumes when headset is plugged

The correct volume levels for <device>_speaker and
<device>_headset are not restored when a headset device
is plugged in or out
frameworks/base: Add support for wired headset detection

Change-Id: Ia6f26af85aded9decbce93fc2f381f39ff9ab81b
EventHub: Modify the keyboard layout file name for headset button

The keyboard layout file name was formed based on the name of
tabla sound card on current machine. If it doesn't find such
file, it is going to use Generic keyboard layout where the
key mappings are different, even though the scan code is same.
The sound card name differs across different machine types.
So, generalising the keyboard layout file name will work across
all machine types.

CRs-fixed: 344297
Change-Id: I416b6179f51ac98fe7dfae5268ffb58c243540a4
frameworks/base: Fix for headset switch detect

- Headset Switch detect is not functional
- Headset driver on modem in 8x25 and 7x27A targets
  introduces a delay of 500ms before reporting headset
  events to application processor to avoid the problem
  of spurious interrupts being reported due to hardware
  limitation on these targets. Frameworks code in JB
  treats button release event received after 500ms after
  button press as long press event and generates WEBSEARCH
  event. Due to this all the events in 8x25 and 7x27A
  are interpreted as long press events.
- To avoid this problem increase the timeout to more than
  500ms by introducing headset hook delay property for
  these targets.

CRs-fixed: 387247
(cherry picked from commit 5878d849442af33378805f7b9964102119c2fc93)

Change-Id: I03a77666bb217168f7c362bd775dadfbe09fe638
PhoneWindowManager: Release wakelock after headset detection.

- Device does not go to suspend mode after boots up with headset connected.
- Wakelock is not released properly if headsed is detected during boot up.
- Release wakelock in headset intent handler.

CRs-fixed: 384362

(cherry picked from commit 67ddd3c31c7a58aed89f12f956a4d29d58654ed7)

Change-Id: I09f81f4f0e4b2035b13acbb23f6c1dd7b84652c1