Android, WebRTCDemo: fixes crash issue when pressing switch camera button on devices with only one camera.
BUG=2807(second issue) R=fischman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/7579004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5429 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
98aefcd8fe
commit
57f6c10d00
@ -561,7 +561,7 @@ public class MediaEngine implements VideoDecodeEncodeObserver {
|
||||
}
|
||||
|
||||
public boolean hasMultipleCameras() {
|
||||
return cameras.length > 1;
|
||||
return Camera.getNumberOfCameras() > 1;
|
||||
}
|
||||
|
||||
public boolean frontCameraIsSet() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user