From 751a3653a0ab36b98d29da689f26d315c8426701 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 9 Apr 2023 15:18:31 +0200 Subject: [PATCH] Add missing @Override annotations PR #3978 --- server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java | 3 +++ .../src/main/java/com/genymobile/scrcpy/AudioRawRecorder.java | 3 +++ server/src/main/java/com/genymobile/scrcpy/Controller.java | 3 +++ 3 files changed, 9 insertions(+) diff --git a/server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java b/server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java index f2bba772..ac2f0a31 100644 --- a/server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java +++ b/server/src/main/java/com/genymobile/scrcpy/AudioEncoder.java @@ -114,6 +114,7 @@ public final class AudioEncoder implements AsyncProcessor { } } + @Override public void start() { thread = new Thread(() -> { try { @@ -129,6 +130,7 @@ public final class AudioEncoder implements AsyncProcessor { thread.start(); } + @Override public void stop() { if (thread != null) { // Just wake up the blocking wait from the thread, so that it properly releases all its resources and terminates @@ -136,6 +138,7 @@ public final class AudioEncoder implements AsyncProcessor { } } + @Override public void join() throws InterruptedException { if (thread != null) { thread.join(); diff --git a/server/src/main/java/com/genymobile/scrcpy/AudioRawRecorder.java b/server/src/main/java/com/genymobile/scrcpy/AudioRawRecorder.java index f98440de..32efc354 100644 --- a/server/src/main/java/com/genymobile/scrcpy/AudioRawRecorder.java +++ b/server/src/main/java/com/genymobile/scrcpy/AudioRawRecorder.java @@ -53,6 +53,7 @@ public final class AudioRawRecorder implements AsyncProcessor { } } + @Override public void start() { thread = new Thread(() -> { try { @@ -68,12 +69,14 @@ public final class AudioRawRecorder implements AsyncProcessor { thread.start(); } + @Override public void stop() { if (thread != null) { thread.interrupt(); } } + @Override public void join() throws InterruptedException { if (thread != null) { thread.join(); diff --git a/server/src/main/java/com/genymobile/scrcpy/Controller.java b/server/src/main/java/com/genymobile/scrcpy/Controller.java index 59fae602..ab09c336 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Controller.java +++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java @@ -84,6 +84,7 @@ public class Controller implements AsyncProcessor { } } + @Override public void start() { thread = new Thread(() -> { try { @@ -98,6 +99,7 @@ public class Controller implements AsyncProcessor { sender.start(); } + @Override public void stop() { if (thread != null) { thread.interrupt(); @@ -105,6 +107,7 @@ public class Controller implements AsyncProcessor { sender.stop(); } + @Override public void join() throws InterruptedException { if (thread != null) { thread.join();