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

Commit 2e961480 authored by Andy Hung's avatar Andy Hung
Browse files

MediaCodecInfo: Fix getSupportedSampleRates for null array

Test: MediaCodecTest#testPCMEncoding
Bug: 122116282
Change-Id: I3d7e16d130a6653e95e285b38678a8b4946319d7
parent b40b278d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -972,7 +972,7 @@ public final class MediaCodecInfo {
         * {@code null}.  The array is sorted in ascending order.
         */
        public int[] getSupportedSampleRates() {
            return Arrays.copyOf(mSampleRates, mSampleRates.length);
            return mSampleRates != null ? Arrays.copyOf(mSampleRates, mSampleRates.length) : null;
        }

        /**