From 2edf192e3ae80252d136e6d1a614ab07f93fc561 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 5 Oct 2020 21:09:01 +0200 Subject: [PATCH] Remove deprecation warning As a workaround for some devices, we need to prepare the main looper. The method is now deprecated, but we still want to call it. --- server/src/main/java/com/genymobile/scrcpy/Workarounds.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/com/genymobile/scrcpy/Workarounds.java b/server/src/main/java/com/genymobile/scrcpy/Workarounds.java index 351cc574..0f473bc1 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Workarounds.java +++ b/server/src/main/java/com/genymobile/scrcpy/Workarounds.java @@ -16,6 +16,7 @@ public final class Workarounds { // not instantiable } + @SuppressWarnings("deprecation") public static void prepareMainLooper() { // Some devices internally create a Handler when creating an input Surface, causing an exception: // "Can't create handler inside thread that has not called Looper.prepare()"