Camera: Adds support for meta data callbacks

- This change adds a new type of callback
  that will be called when there are pending
  meta data notifications.

Change-Id: I190971b2d0d4d189e8f4edee8204ef65b62cd453
Cherrypicked from 9706034f16d23f96966dbd060f1bb85c5a4d976a
Camera: Adds support for longshot configuration

- The Camera API is extended with one additional
  call for longshot mode configuration.

(cherrypicked from commit 867c4865b2a61a8e844e2784c41b7aafc392aec0 )

Change-Id: Idb91a21dc0d9fa9d22b4a6bbcc0b2eebfc2cb6db
Camera: use single KEY for set/get manual 3A parameters.

Instead of using different KEYs, we can share one same key,
for set/get 3A parameters from APK.

Change-Id: Ie3216ee4e1b8f62fcdd57a0be119d4b8dcdd81b3
Camera: make HW-Capture key can not waken up the screen

When HW-Capture key is pressed,
will generate KEYCODE_FOCUS key event which wakes up the screen.

make KEYCODE_FOCUS key event not to wake up the screen.

CRs-Fixed: 516900

Change-Id: I53beb28b9981141b02fd9fc1223e97efd1ab400e
media: Configure audio encode parameters only for valid audio codec.

Added extra check for audio codec in profile
(Cherrypicked from commit eed39d0053dee6649424867418e511b918b3c634)

Change-Id: Ie1ac5252e3d544ce61af2b3ae5080ec9c6966e44
SystemUI: Add data type and signal icons

Add data type and signal icons.

Change-Id: Iaa97b2d9477d740686e724d6b1c3d2fcbf30692a
Statusbar: Add some resources of signal icon

Add some resources of the signal icon which used in statusbar.

Change-Id: Ie8823d37485bba0cd50ed90142532fda00f4f71d
Bluetooth: Audio Squashed gerrits for propagation

Bluetooth: pause music player on A2dp service disconnect

When A2dp service disconnects as part of SSR, it marks a2dp state
as unavailable in Audio module but does not pause music player, as
a result when bluedroid stack restarts as part of sub system restart,
media player does not pause and music continues to play on device
speaker.
This change helps to pause the media player, in addition to marking
a2dp as unavailable, so that media player pauses when a2dp service
forcibly disconnects as part of sub system restart with A2dp in
connected state.

CRs-Fixed: 590462
Change-Id: I05ee5bcc808eb438156b64181d54e8ccabe1e186

Bluetooth: Add Total track number.

Add support to add total number of tracks in
Meta-data

Change-Id: I5b1287f791615adcd4f920fe5c7cae0c7c7b04ea
CRs-Fixed: 627869

Bluetooth: use  virtual sco calls for VOIP

 - use virtualvoicesco connection set-up for VOIP calls
 - cannot simply revert c18c9138cee0f0859bcab636a004ce92ca4a9ab5
and 25fc29b3691a1d2a84164988dc74b2e7d301868e changes because
of aidl modifications involved.

Change-Id: Ib49cb01151a9cea2e94bc7a51ad1f58e877271aa
CRs-Fixed: 598072

Send Media button events as foreground Intent

Send foreground intent for Media Button events to Music Player
so that there is no delay in handling these Intents after the
device is rebooted.

Change-Id: I952a8af93586cb96c0a9f6dc910bfb49287f4b9a
CRs-fixed: 611219
Conflicts:
media/java/android/media/AudioService.java
QuickBoot: Don't handle specific broadcasts from QuickBoot

Don't process the BOOT_COMPLETED/SHUTDOWN broadcasts sent by
QuickBoot. They are only for apps.

Change-Id: I1551d0cd73d87b6780dcffd4c1ad5c54a7c76cc8
QuickBoot: don't wake up screen when usb connected

Don't wake up screen in QuickBoot mode when usb connected.

Change-Id: If65936a0edbbc3b36a0768294e5c3bd7d741018a
QuickBoot: filter alarms that not in whitelist

Don't response to alarms that not in whitelist under QuickBoot mode.

Change-Id: Ib43d13897f11945e0fa8b9b06c68b7949ca456c8
QuickBoot: restrict app's auto start under Quickboot mode

Don't launch apps that not in whitelist under Quickboot mode.

Change-Id: I5d156cbea4ef18397ce4569cb74f73a446a6e49b
QuickBoot: remove alarms for killed apps

Device may be woken up by WAKEUP alarms, which have been set
by those killed apps before. Here to get the killed apps list
and remove the alarms from AlarmManagerService.

Change-Id: I86b119e3c0e695a34cba3f168b15ecd6b97e462b
QuickBoot: Add wakeup check under QuickBoot mode

We only want QuickBoot application to wakeup screen in QuickBoot
mode. Add wakeup check to filter out other wakeup callers.

Change-Id: I765c698449ed0aca8d18d3ec93e00ce34bc33a68
QuickBoot: enable QuickBoot power on

Support long press power key to power on when in QuickBoot mode.

Change-Id: I92a70e6d58f7b6c49e19ec446766f95d4c873846
QuickBoot: switch normal power off to quickboot

Handle power off button when quickboot mode enabled.

Change-Id: If317441a611e5bfed69c1a3c7ee4045b49a36d86
frameworks/base: Fix to avoid crash when the tab is not set.

Tab is not highlighted in Videoapp unlike Music app.
Instead the list is highlighted with mSelectedTab a negative value
when onFocusChange is called.
Add a check for mSelectedTab.

Change-Id: I930657b8a9be4be4d973f876242a15a667ec6f94
CRs-Fixed: 657606
MMS: Fix Messaging will force close after tap one item in suggestion list

The span end is larger than string's length, it caused IndexOutOfBounds
exception.

Check the span end to avoid the IndexOutOfBounds exception.

CRs-Fixed: 555378

Change-Id: Iaf1cbe8db8704b3112afb6207982750b650fe5c5
Common: Add the api to parse the string to current language

These APIs are used to parse the text to local languange.
For example, if the carrier name in English is got from network or SIM card, we will
use these APIs to parse it to local language and display it to the user.

Change-Id: Id4922c526d77f434b43c5ac013472b6a1cd5069c
DownloadManager: add to pause/resume download by user

We add pause and resume APIs here to make application can
pause and resume downloads by DownloadManager.

Code change contains:
  - add pause and resume download APIs.
  - add another paused status for this case.

Change-Id: I5bf4f15b2464009595f7926522ca6d5f1b0e2b8d