Merge "AudioAttributes: IAE for illegal usage / content type values."

This commit is contained in:
Jean-Michel Trivi
2019-10-18 18:34:16 +00:00
committed by Android (Google) Code Review

View File

@@ -670,7 +670,7 @@ public final class AudioAttributes implements Parcelable {
mUsage = usage;
break;
default:
mUsage = USAGE_UNKNOWN;
throw new IllegalArgumentException("Invalid usage " + usage);
}
return this;
}
@@ -696,7 +696,7 @@ public final class AudioAttributes implements Parcelable {
mContentType = contentType;
break;
default:
mContentType = CONTENT_TYPE_UNKNOWN;
throw new IllegalArgumentException("Invalid content type " + contentType);
}
return this;
}