Add missing cases to IntDef switch + fix default locale usage

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209396260
This commit is contained in:
olly 2018-08-20 04:28:11 -07:00 committed by Oliver Woodman
parent f64ec43acd
commit 05dcf502e5
3 changed files with 13 additions and 3 deletions

View File

@ -98,6 +98,8 @@ import java.nio.ByteOrder;
break;
case C.ENCODING_PCM_16BIT:
case C.ENCODING_PCM_FLOAT:
case C.ENCODING_PCM_A_LAW:
case C.ENCODING_PCM_MU_LAW:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
default:
@ -134,6 +136,8 @@ import java.nio.ByteOrder;
break;
case C.ENCODING_PCM_16BIT:
case C.ENCODING_PCM_FLOAT:
case C.ENCODING_PCM_A_LAW:
case C.ENCODING_PCM_MU_LAW:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
default:

View File

@ -188,9 +188,12 @@ public final class DefaultContentMetadata implements ContentMetadata {
byte[] bytes = getBytes(value);
if (bytes.length > MAX_VALUE_LENGTH) {
throw new IllegalArgumentException(
String.format(
"The size of %s (%d) is greater than maximum allowed: %d",
name, bytes.length, MAX_VALUE_LENGTH));
"The size of "
+ name
+ " ("
+ bytes.length
+ ") is greater than maximum allowed: "
+ MAX_VALUE_LENGTH);
}
metadata.put(name, bytes);
}

View File

@ -1245,6 +1245,8 @@ public final class Util {
case C.ENCODING_PCM_32BIT:
case C.ENCODING_PCM_FLOAT:
return channelCount * 4;
case C.ENCODING_PCM_A_LAW:
case C.ENCODING_PCM_MU_LAW:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
default:
@ -1325,6 +1327,7 @@ public final class Util {
case C.USAGE_NOTIFICATION_EVENT:
return C.STREAM_TYPE_NOTIFICATION;
case C.USAGE_ASSISTANCE_ACCESSIBILITY:
case C.USAGE_ASSISTANT:
case C.USAGE_UNKNOWN:
default:
return C.STREAM_TYPE_DEFAULT;