OSDN Git Service

VolumePreference: fix audio sample playback
authorEric Laurent <elaurent@google.com>
Fri, 12 Apr 2013 23:29:40 +0000 (16:29 -0700)
committerEric Laurent <elaurent@google.com>
Fri, 19 Jul 2013 19:48:02 +0000 (19:48 +0000)
commitaca105cfb4479cf8635baed699daf803648a3fed
treef01db59b889a714456e0013d390e280f21d1c4a3
parent194ea7d9a34e5e064c99b45975530bb3829a5ba2
VolumePreference: fix audio sample playback

Handle audio sample start/stop request in a handler
to avoid race conditions.

If a sample is active, do not ignore playback requests but
schedule a second attempt one second later. This is to avoid
ignoring a playback request if a sample is short or about to finish.

Bug: 8176776.

Change-Id: If2d5f7d469eba345af3f4771067a076a56f4bfed
core/java/android/preference/VolumePreference.java