From 87a62666ac0d5af0c4fb74d35ce1de3d704b0b45 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 20 Jun 2016 20:43:59 -0700 Subject: [PATCH] Prefer Shield capture provider over Android N --- .../binding/input/capture/InputCaptureManager.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/limelight/binding/input/capture/InputCaptureManager.java b/app/src/main/java/com/limelight/binding/input/capture/InputCaptureManager.java index 2411e8df..2fe296fd 100644 --- a/app/src/main/java/com/limelight/binding/input/capture/InputCaptureManager.java +++ b/app/src/main/java/com/limelight/binding/input/capture/InputCaptureManager.java @@ -8,14 +8,17 @@ import com.limelight.binding.input.evdev.EvdevListener; public class InputCaptureManager { public static InputCaptureProvider getInputCaptureProvider(Activity activity, EvdevListener rootListener) { - if (AndroidCaptureProvider.isCaptureProviderSupported()) { - LimeLog.info("Using Android N+ native mouse capture"); - return new AndroidCaptureProvider(activity); - } - else if (ShieldCaptureProvider.isCaptureProviderSupported()) { + // Shield capture is preferred because it can capture when the cursor is over + // the system UI. Android N native capture can only capture over views owned + // by the application. + if (ShieldCaptureProvider.isCaptureProviderSupported()) { LimeLog.info("Using NVIDIA mouse capture extension"); return new ShieldCaptureProvider(activity); } + else if (AndroidCaptureProvider.isCaptureProviderSupported()) { + LimeLog.info("Using Android N+ native mouse capture"); + return new AndroidCaptureProvider(activity); + } else if (EvdevCaptureProvider.isCaptureProviderSupported()) { LimeLog.info("Using Evdev mouse capture"); return new EvdevCaptureProvider(activity, rootListener);