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

Commit 2c4c9168 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Force initialize MediaCodec during initializing Tuner to fix flaky cts result" into main

parents fdbabfc4 5d4aef88
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.content.pm.PackageManager;
import android.hardware.tv.tuner.Constant;
import android.hardware.tv.tuner.Constant64Bit;
import android.hardware.tv.tuner.FrontendScanType;
import android.media.MediaCodec;
import android.media.tv.TvInputService;
import android.media.tv.tuner.dvr.DvrPlayback;
import android.media.tv.tuner.dvr.DvrRecorder;
@@ -272,8 +273,12 @@ public class Tuner implements AutoCloseable {
        try {
            System.loadLibrary("media_tv_tuner");
            nativeInit();
            // Load and initialize MediaCodec to avoid flaky cts test result.
            Class.forName(MediaCodec.class.getName());
        } catch (UnsatisfiedLinkError e) {
            Log.d(TAG, "tuner JNI library not found!");
        } catch (ClassNotFoundException e) {
            Log.e(TAG, "MediaCodec class not found!", e);
        }
    }