Add missing @Override annotations

PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
This commit is contained in:
Romain Vimont 2023-04-09 15:18:31 +02:00
parent 9c08eb79cb
commit 751a3653a0
3 changed files with 9 additions and 0 deletions

View file

@ -114,6 +114,7 @@ public final class AudioEncoder implements AsyncProcessor {
} }
} }
@Override
public void start() { public void start() {
thread = new Thread(() -> { thread = new Thread(() -> {
try { try {
@ -129,6 +130,7 @@ public final class AudioEncoder implements AsyncProcessor {
thread.start(); thread.start();
} }
@Override
public void stop() { public void stop() {
if (thread != null) { if (thread != null) {
// Just wake up the blocking wait from the thread, so that it properly releases all its resources and terminates // 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 { public void join() throws InterruptedException {
if (thread != null) { if (thread != null) {
thread.join(); thread.join();

View file

@ -53,6 +53,7 @@ public final class AudioRawRecorder implements AsyncProcessor {
} }
} }
@Override
public void start() { public void start() {
thread = new Thread(() -> { thread = new Thread(() -> {
try { try {
@ -68,12 +69,14 @@ public final class AudioRawRecorder implements AsyncProcessor {
thread.start(); thread.start();
} }
@Override
public void stop() { public void stop() {
if (thread != null) { if (thread != null) {
thread.interrupt(); thread.interrupt();
} }
} }
@Override
public void join() throws InterruptedException { public void join() throws InterruptedException {
if (thread != null) { if (thread != null) {
thread.join(); thread.join();

View file

@ -84,6 +84,7 @@ public class Controller implements AsyncProcessor {
} }
} }
@Override
public void start() { public void start() {
thread = new Thread(() -> { thread = new Thread(() -> {
try { try {
@ -98,6 +99,7 @@ public class Controller implements AsyncProcessor {
sender.start(); sender.start();
} }
@Override
public void stop() { public void stop() {
if (thread != null) { if (thread != null) {
thread.interrupt(); thread.interrupt();
@ -105,6 +107,7 @@ public class Controller implements AsyncProcessor {
sender.stop(); sender.stop();
} }
@Override
public void join() throws InterruptedException { public void join() throws InterruptedException {
if (thread != null) { if (thread != null) {
thread.join(); thread.join();