Merge "Camera2 legacy: Do not advertise NV21 support." into lmp-mr1-dev

This commit is contained in:
Eino-Ville Talvala
2015-01-28 23:20:00 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 7 deletions

View File

@@ -328,15 +328,15 @@ public class LegacyMetadataMapper {
appendStreamConfig(availableStreamConfigs, appendStreamConfig(availableStreamConfigs,
ImageFormat.YUV_420_888, previewSizes); ImageFormat.YUV_420_888, previewSizes);
for (int format : p.getSupportedPreviewFormats()) { for (int format : p.getSupportedPreviewFormats()) {
if (ImageFormat.isPublicFormat(format)) { if (ImageFormat.isPublicFormat(format) && format != ImageFormat.NV21) {
appendStreamConfig(availableStreamConfigs, format, previewSizes); appendStreamConfig(availableStreamConfigs, format, previewSizes);
} else { } else if (VERBOSE) {
/* /*
* Do not add any formats unknown to us * Do not add any formats unknown to us
* (since it would fail runtime checks in StreamConfigurationMap) * (since it would fail runtime checks in StreamConfigurationMap)
*/ */
Log.w(TAG, Log.v(TAG,
String.format("mapStreamConfigs - Skipping non-public format %x", format)); String.format("mapStreamConfigs - Skipping format %x", format));
} }
} }
@@ -389,8 +389,8 @@ public class LegacyMetadataMapper {
int j = 0; int j = 0;
for (String mode : antiBandingModes) { for (String mode : antiBandingModes) {
int convertedMode = convertAntiBandingMode(mode); int convertedMode = convertAntiBandingMode(mode);
if (convertedMode == -1) { if (VERBOSE && convertedMode == -1) {
Log.w(TAG, "Antibanding mode " + ((mode == null) ? "NULL" : mode) + Log.v(TAG, "Antibanding mode " + ((mode == null) ? "NULL" : mode) +
" not supported, skipping..."); " not supported, skipping...");
} else { } else {
modes[j++] = convertedMode; modes[j++] = convertedMode;

View File

@@ -117,7 +117,7 @@ public class ArrayUtils {
// Guard against unexpected values // Guard against unexpected values
if (strIndex < 0) { if (strIndex < 0) {
Log.w(TAG, "Ignoring invalid value " + str); if (VERBOSE) Log.v(TAG, "Ignoring invalid value " + str);
continue; continue;
} }