Handle android.media.ResourceBusyException in MediaDrm::openSession().
commitaafe1677ffd4851e0f84a37ad3e989ad2ad5d309
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 26 Jun 2014 06:29:06 +0000 (26 06:29 +0000)
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 26 Jun 2014 06:29:06 +0000 (26 06:29 +0000)
tree8e072b1e2af1bfa3577de5dfeb8b6fd693f2437d
parent2754bf8d56d3c1b5a123730256214c0953dba9f2
Handle android.media.ResourceBusyException in MediaDrm::openSession().

Based on Android MediaDrm API documentation:
https://developer.android.com/reference/android/media/MediaDrm.html#openSession()

openSession() could actually throw ResourceBusyException. This is added in API
level 19. To be compatible with both API level 18 and 19, we cannot catch
ResourceBusyException directly. Instead, we catch NotProvisionedException
explicitly, and catch all other MediaDrmExceptions together.

TBR=qinmin@chromium.org
BUG=387763

Review URL: https://codereview.chromium.org/353743009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279929 0039d316-1c4b-4281-b951-d872f2087c98
media/base/android/java/src/org/chromium/media/MediaDrmBridge.java