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
Music: Fix to make progress bar update for fast forward and rewind while in suspend

- While playback, press suspend key. While in suspend press fast forward
  continuously. UI screen activates and starts fast forward from the
  beginning of the playback.
- While in suspend, the first fast forward key press is activating the UI
  screen. On second fast forward key press, reset the seek position and
  moves back to starting of the playback.
- Changes are done to seek from the same position of playback while in suspend.

Change-Id: I37caade921d3801adc5f07878e6849a5e91ba012
CRs-Fixed: 335626
Merge commit 'android-4.0.4_r1.1' into merge_branch

* commit 'android-4.0.4_r1.1':
  Import translations. DO NOT MERGE

Change-Id: Ieffd8e8760a1b0b173e8e7b5b867666ae58104b8
packages/apps/Music: Fix for excessive JNI references issue

- During monkey run on music app, some JNI references from music
  app are not being dereferenced and resulting framework reboot.
- In the TrackBrowserActivity, there are some cursor references
  are not being closed explicitly.
- This fix ensures all the cursor references are closed properly
  to avoid excessive JNI references.

Change-Id: I6c48e081063ee15234b733fa1a6f23c19a3d6d39
packages/apps/Music: Fix for excessive JNI references issue#2

- During monkey run on music app, some JNI references from music
  app are not being dereferenced and resulting framework reboot.
- In the TrackBrowserActivity, the cursor JNI references made
  while creating NowPlayingCursor object are not being closed.
- This fix ensures all the cursor references are closed properly
  to avoid excessive JNI references.

Change-Id: I494fed53732e0fc1e5b6abc88fb9c581b8833136
Merge "Merge commit 'android-4.0.4_r1.1' into merge_branch" into ics
Merge "packages/apps/Music: Fix for excessive JNI references issue#2" into ics
Music: Fix for seekbar issue on interrupt by call

- Seek bar stucks on call interrupt while fast-forwarding
or rewinding a clip.
- When user presses next/previous for seeking, scanForward()
is called by fwdListener which in turn performs seek operation
updating timeline and seekbar. Each event of seek is posted to
the listener with a delay of 260ms.
In this usecase when the target gets the call, by the time seek event
is posted with repcnt as -1, mService is set to NULL.Since mService
is null it returns without setting mPosoverride to -1.Due to this,
mPosoverride retains the older value where the last seek operation
was successfully completed.When call is disconnected and music
playback is resumed, since mPosoverride is positive, position
of the seekbar is always updated with mPosoverride in refreshNow().
- In scanForward() and scanBackward(), set mPosoverride to -1
in case mService is null and is called with repcnt -1.
Since seek event is posted with a delay, this ensures that
last seek event is acknowledged even if mService is null.

Change-Id: I527be16537ee95b754581047ab7cb1e0c09de7a8

CRs-Fixed: 349576
Music: Fix for seek bar stucks after pressing suspend key

- Seek bar stucks while pressing Suspend key during Fast-forwarding
or Rewinding the clip
- During power suspend, mPosoverride value is set to the current
playback position since seeking is in progress. mPosoverride is
reset only when user stops pressing seek button. In this use case
Suspend is called before getting the last seek event. Hence seek bar
is always at a constant position taking the value of mPosoverride.
- Reset mPosoverride to -1 when suspend key is pressed if
mPosoverride is set to a positive value.

Change-Id: I6f572a93db2236971ce65e01d69be5bb2c7e7b45

CRs-Fixed: 354251
Merge branch 'ics' of git://codeaurora.org/platform/packages/apps/Music

Change-Id: I60098bb16e2f44a8526d2cba9ee540bc5a3f0d7b