diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 7f805e6..66d622f 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -7,5 +7,5 @@ - + diff --git a/android/src/main/java/com/captureprotection/Utils.java b/android/src/main/java/com/captureprotection/Utils.java new file mode 100644 index 0000000..cd07f2b --- /dev/null +++ b/android/src/main/java/com/captureprotection/Utils.java @@ -0,0 +1,28 @@ +package com.captureprotection; + +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import androidx.annotation.NonNull; +import java.util.concurrent.Executor; + +public class Utils { + public static final class MainExecutor implements Executor { + static final Executor INSTANCE = new MainExecutor(); + private final Handler handler = new Handler(Looper.getMainLooper()); + + @Override + public void execute(Runnable r) { + handler.post(r); + } + } + + public static final class MainHandler { + static final Handler INSTANCE = new Handler(Looper.getMainLooper(), new Handler.Callback() { + @Override + public boolean handleMessage(@NonNull Message msg) { + return false; + } + }); + } +}