Import translations. DO NOT MERGE

Change-Id: Ib4f613cc881ad148151cd29776f652f356873b6c
Fix crash when the last played file is missing

Fix application crash on startup when the last file that had been playing was deleted from PC in USB mode

Change-Id: I4e5ac9049972ca344e5be867836bf9e5c95288c0
Merge branch 'ics-mr1-release' of https://android.googlesource.com/platform/packages/apps/Music into aosp
Add application/x-flac to the mime types the music app supports.

back-ported from this http://review.cyanogenmod.com/#change,4281

Change-Id: I70d4c095244a9c60002395b36c7315d545e4e71c
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 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 : Making VideoBrowserActivity a LAUNCHER activity.

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

Change-Id: Ib8f74d05f99147e7f443433f59aa4b2a998baaed
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
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
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
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.

CRs-Fixed: 332155
(cherry picked from commit 3d57e706411ada78f6729174d48e797a67d48380)

Change-Id: I412582f332bcdef438077bf9794143627793c939
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.

CRs-Fixed: 332750
(cherry picked from commit 42437c48842a461a269e79e6a0a37373aafa06d7)

Change-Id: I9c8a3c82c02d13ce3e1865ca263b1966104c7e49
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.

CRs-Fixed: 335626
(cherry picked from commit a061e4f7a30565fbf0aa6ebde15325dad60f402c)

Change-Id: Ieb4d44c53a17a7c17d83dd920db938177cf0013b
packages/apps/Music: Add log to print the name of audio clip
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