Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72a60f82 authored by Andy Hung's avatar Andy Hung
Browse files

AudioFormat: Add IntRange annotation to getFrameSizeInBytes

Test: compile
Bug: 122885005
Change-Id: I4cef60d5b767ca05f4cf0284ee18f99fd886635b
parent 4fd4e36b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.media;

import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -816,7 +817,7 @@ public final class AudioFormat implements Parcelable {
     *
     * @return The audio frame size in bytes corresponding to the encoding and the channel mask.
     */
    public int getFrameSizeInBytes() {
    public @IntRange(from = 1) int getFrameSizeInBytes() {
        return mFrameSizeInBytes;
    }