Commit 05dcf502 by olly Committed by Oliver Woodman

Add missing cases to IntDef switch + fix default locale usage

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209396260
parent f64ec43a
......@@ -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:
......
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment