summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorraywilliams <raywilliams@google.com>2015-07-07 15:04:26 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-07 22:05:01 +0000
commit057c109bf6e12d0302e913be78c3c9ca3fe0c3ed (patch)
tree33b957d5d19509c27d3300f996e810a1674a4d2b /media
parente2d6216b43d2c9fb03f850fc0994bc984ef891f3 (diff)
downloadchromium_src-057c109bf6e12d0302e913be78c3c9ca3fe0c3ed.zip
chromium_src-057c109bf6e12d0302e913be78c3c9ca3fe0c3ed.tar.gz
chromium_src-057c109bf6e12d0302e913be78c3c9ca3fe0c3ed.tar.bz2
Fix Problems found by Errorprone
20 Files with Fixes 2 Files with Suppressions Some errors were suppressed as they appear to be deliberate Includes fixes for: [Finally] [PrimitiveArrayPassedToVarargsMethod] [DepAnn] [StaticAccessedFromInstance] [StringEquality] [CollectionIncompatibleType] [WaitNotInLoop] See http://errorprone.info/bugpatterns for information about these bug patterns BUG=485599 Review URL: https://codereview.chromium.org/1209413009 Cr-Commit-Position: refs/heads/master@{#337683}
Diffstat (limited to 'media')
-rw-r--r--media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
index e56c1e1..f60d620 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java
@@ -28,7 +28,6 @@ import org.chromium.base.Log;
import java.nio.ByteBuffer;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
/**
@@ -342,8 +341,13 @@ public class VideoCaptureCamera2 extends VideoCapture {
CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
// Per-format frame rate via getOutputMinFrameDuration() is only available if the
// property REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR is set.
- final boolean minFrameDurationAvailable = Arrays.asList(capabilities).contains(
- CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
+ boolean minFrameDurationAvailable = false;
+ for (int cap : capabilities) {
+ if (cap == CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR) {
+ minFrameDurationAvailable = true;
+ break;
+ }
+ }
ArrayList<VideoCaptureFormat> formatList =
new ArrayList<VideoCaptureFormat>();