packages/apps/Music : Making VideoBrowserActivity a LAUNCHER activity.

Making VideoBrowserActivity a launcher activity
so that it shows up on home screen.

Change-Id: Ib8f74d05f99147e7f443433f59aa4b2a998baaed
Bluetooth: Merge bluetooth changes

- Add support for AVRCP 1.3 feature
- Fix for A2DP and reading of total songs from MediaScanner
- This change is merge of below commits:

commit c29951e7f8102270c081b832c3f6f69ade90df18
Author: Prabhakaran Mc <prabhakaranmc@codeaurora.org>

    Music: Bluetooth: Change to read Total songs from MediaScanner

commit ebed3fece6cdaa4d904f14651eaab5f84eec2ea8
Author: Prabhakaran Mc <prabhakaranmc@codeaurora.org>

    Music: Bluetooth AVRCP 1.3 feature  changes

commit dbf127124595c4bcdde79ce10cf558cf66a085df
Author: Srinivas Krovvidi <skrovvid@codeaurora.org>

    Music: Fix for handling A2DP SUSPEND in Music App.

Change-Id: I4a32a06fd31781661eeb93276124aea50003377a
packages/apps/Music: Eliminate wakeup events for screen refresh

- When screen timeout happens, musicplaybackactivity keeps updating UI
  resulting in Apps proc wakeups and high power consumption.
- Ensuring that the screen refresh is not happening and the screen is updated
  appropriately when screen on event is received by the application.

Change-Id: I3598be5352ccd514efce01d43d81cc39a6ce54c9
CRs-Fixed: 271448
packages/apps/Music: Fix for incorrect current position during rapid fast forward

- The current position of audio clip is shown incorrect during
  continuous fast forward operation.
- The current position is not retrieved from the framework as
  application jumps to next clip rapidly.
- Add check for not showing the current position more than total
  duration.

Change-Id: I517efadd0b3c0bc61b3dd6515444691c3f7b2aed
CRs-Fixed: 271562
/platform/packages/apps/Music: Do not load component when unplug headset

- Whenever headset is unplugged, the broadcastreceiver started the
  MediaPlayerService, resulting in re-loading the component if it is not
  running.
- Ensure that the intent is propogated only when the service is running to
  avoid unnecessary loading of components.
- This might not impact software decoders, but have lot of load when hardware
  decoders are used.

Change-Id: I2c64636bfed89915138a9b2925382279669abb83
packages/apps/Music: Corrupted audio clips in repeat mode result in an ANR

-The corrupted WMA audio clips in repeat mode fail repeatedly
resulting in application not responding.
-MediaPlayerService calls getDuration repeatedly.
-Releasing and creating the media player object when error occurs.

Change-Id: I35ecee7e9ac7d80409eacd2000a5cebb6c4b1ce0
CRs-Fixed: 294586
packages/apps/Music: Add log to print the name of audio clip being played

Change-Id: I9a9d6d80b2079d85128db6fa88a8b64c8ff2e8b0
packages/apps/Music: Fix for ANR while opening an album in Music app.

- While opening an album using Music app, force close error is seen.
- There was no check whether 'mIndexer' is null before using it.
- Fixed by performing null check before using 'mIndexer'.

Change-Id: I240863b01098038250b26202ad7f42f4717a9c65
CRs-Fixed: 280854
Music: Fix to handle prev and next commands on Music app

- By keeping unsupported clip in the middle of two supported
  clips, rewind doesn't happen to previous clip.

- When the playlist contain invalid content, the current
  logic to store number of track failed to open, and
  adjusting the track number accordingly on PREV command,
  do not handle all the scenarios of NEXT and PREV.

- Fix is to make sure that if previous track is failed to open,
  then it will try to open track before previous but not
  next to failed track.

Change-Id: I9e2e401ac237a6a5daf9a157bbd3e259bb309432
CRs-fixed: 300167
Music: Close cursor after its usage

While executing TC_TG_NFY_BV_02 PTS test case, sometimes A2dp
connection fails because of resource leak seen with Music app.
The temporary cursor object used in notifyChange() procedure
is not closed manually which is causing this problem. Close
this cursor after its usage.

Change-Id: I7830eefd5df88f49f76af1005cf35aa83ef2253b
CRs-fixed: 323457
Merge remote branch 'remotes/quic/aosp/ics-mr1-release' into merge_branch
packages/apps/Music: Fix blinking of disc in Music application

- At start of playback, disc symbol in Music app appears and disappears.
- Albumart is set twice even in cases where it has been set in the first
  attempt. This is due to wrong update of Albumid and leads to appearance
  and dissapearance of the disc in the music application.
- Update Albumid only in case of error to prevent setting of Albumart in
  case already set succesfully.

Change-Id: Ib334bbdd2750e7bc9831fd7684ce760a52b07258
CRs-Fixed: 328069
packages/apps/Music: Fix for Music App continuous crash

-Music App crashes when it makes an attempt to access
 a deleted audio clip.
-getTrackName() throws a cursor out-of-bound  exception
 for the deleted audio clip.
-Call getTrackName() only when the audio clip exists.

Change-Id: Id436ab4a30bfad27370aa4824fe6ce4e34cdeb4f
CRs-Fixed: 327862
Revert "Add application launch category."

This reverts commit b2e67c53269e0a2ae2f7bcc475556b39bc8a38e9.

- Reverting the change to show up the Music app in the UI along
  with Music2 app from GMS tools.
Merge "packages/apps/Music: Fix blinking of disc in Music application" into ics
Merge "Revert "Add application launch category."" into ics
Music: Fix to make progress bar update while suspend/resume

- While playback, press fast forward continuously. Then press
  suspend and resume while still pressing FF. Release the
  fast forward button, the scroll bar moves back.
- On resume the key down and up times are updated and the
  same values are used while calculating delta on last fast forward
  release. This give a wrong value and scroll bar moves back.
- Changes are done to return from on key up event if seek
  time is in negative and seek flag is false.

Change-Id: I534299a47f4e7c8f9ecd4b8158d1720bb7d9ebb4
CRs-Fixed: 332155
packages/apps/Music: Fix to check the closed cursor before access

-Fatal exception are coming while switching music player icons.
-onQueryComplete function is trying to access the getCount() of the
cursor, already closed by changeCursor().
-Explicitly check the cursor status before the access.

Change-Id: I26140f69ba22a7f9263c577d6beebaba0f345dd4
CRs-Fixed: 332167
packages/apps/Music: Fix for the clip skip at the end of playback

-While playing a clip, during the last 2-3 seconds playabck if the
user selects the same clip from the playlist, next clip is getting
selected by skipping the playback of last 2-3 seconds of the current
clip.

-In Music App, when play is called, a check is done on the
current clip duration. If the current clip has 2 seconds of playback
time remaining, the next clip is getting selected for playback.
Because of this the last 2-3 seconds of playback is getting skipped
for the current clip.

-Fixing this issue by reducing the check on remaining time duration
to 1 sec for the curernt clip.

Change-Id: I3269add63ac40d8f3531a50a50f07ce13683172f
CRs-Fixed: 332750
Merge "packages/apps/Music: Fix to check the closed cursor before access" into ics