Commit 67c21fd4 authored by Lucchetto's avatar Lucchetto Committed by Luca Stefani
Browse files

ScreenService: start recording on a background Thread

 * Avoid blocking the main thread which may cause system freeze
   ANR Input dispatching timed out (window's input channel is full)
Signed-off-by: default avatarLucchetto <>
Signed-off-by: default avatarLuca Stefani <>
Change-Id: I1be5d166ae70b52e21e6acf7826c0b553ca07ab0
parent 5c17bfef
......@@ -47,8 +47,8 @@ import;
import org.lineageos.recorder.R;
import org.lineageos.recorder.RecorderActivity;
import org.lineageos.recorder.utils.MediaProviderHelper;
import org.lineageos.recorder.utils.LastRecordHelper;
import org.lineageos.recorder.utils.MediaProviderHelper;
import org.lineageos.recorder.utils.Utils;
......@@ -231,7 +231,7 @@ public class ScreencastService extends Service implements MediaProviderHelper.On
Intent data = intent.getParcelableExtra(EXTRA_DATA);
if (data != null) {
mMediaProjection = mMediaProjectionManager.getMediaProjection(resultCode, data);
new Thread(this::startRecording).start();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment