From 76d5e93c175a753aa454c89bb29298f1ebca3b99 Mon Sep 17 00:00:00 2001 From: Seyed Mostafa Hasani Date: Thu, 18 Jul 2024 10:41:07 +0330 Subject: [PATCH] refactor(android): migrate BecomingNoisyListener interface to Kotlin (#3996) * Rename .java to .kt * refactor(android): migrate BecomingNoisyListener interface to Kotlin * remove: java file (AudioBecomingNoisyReceiver.java) --- .../brentvatne/receiver/BecomingNoisyListener.java | 13 ------------- .../brentvatne/receiver/BecomingNoisyListener.kt | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.java create mode 100644 android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.kt diff --git a/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.java b/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.java deleted file mode 100644 index 6a5d37d83d..0000000000 --- a/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.brentvatne.receiver; - -public interface BecomingNoisyListener { - - BecomingNoisyListener NO_OP = new BecomingNoisyListener() { - @Override public void onAudioBecomingNoisy() { - // NO_OP - } - }; - - void onAudioBecomingNoisy(); - -} diff --git a/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.kt b/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.kt new file mode 100644 index 0000000000..d967fc9d8b --- /dev/null +++ b/android/src/main/java/com/brentvatne/receiver/BecomingNoisyListener.kt @@ -0,0 +1,12 @@ +package com.brentvatne.receiver + +interface BecomingNoisyListener { + companion object { + val NO_OP = object : BecomingNoisyListener { + override fun onAudioBecomingNoisy() { + // NO_OP + } + } + } + fun onAudioBecomingNoisy() +}