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

Commit 4711f659 authored by Ethan Chen's avatar Ethan Chen
Browse files

FMRadio: Run render thread at THREAD_PRIORITY_AUDIO

Change-Id: Ia7c558bb02b424e96e0af4d01684b7e51fd85bd4
parent 96194b6e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;

@@ -463,6 +464,7 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan

        @Override
        public void run() {
            Process.setThreadPriority(Process.THREAD_PRIORITY_AUDIO);
            try {
                byte[] buffer = new byte[RECORD_BUF_SIZE];
                while (!Thread.interrupted()) {