Fix webrtc in M due to over eager permission check.
commit4ba7afb497499acc92b4a0c58a69570f943083b0
authortedchoc <tedchoc@chromium.org>
Tue, 30 Jun 2015 00:57:27 +0000 (29 17:57 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 30 Jun 2015 00:58:02 +0000 (30 00:58 +0000)
tree309950680abf2d1bf9d806f75b8e229db3bed4c6
parentd58d3366b9757b57acb87e3bf1145eec39194987
Fix webrtc in M due to over eager permission check.

VideoCaptureFactory#getNumberOfCameras checked that Chrome was granted
the CAMERA runtime permission before Chrome has a chance to ask the
user to grant it via the infobar.

This keeps the check in place prior to L as the permission can not
be granted, so there is no reason to spam the user.

Tested by building webivew and running the webview shell on M with
no permissions granted.  Navigated to apprtc.appspot.com and did
not see a crash.

Code originally added in:
https://codereview.chromium.org/264833006

BUG=497854

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

Cr-Commit-Position: refs/heads/master@{#336701}
media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java