style: callback interface methods have become default methods

This commit is contained in:
antonio 2023-06-21 10:48:46 +02:00
parent efc1baa802
commit cb3f1290d1
8 changed files with 35 additions and 38 deletions

View file

@ -3,46 +3,29 @@ package com.cappielloantonio.tempo.interfaces;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.Keep;
@Keep
public interface ClickCallback { public interface ClickCallback {
default void onMediaClick(Bundle bundle) {} default void onMediaClick(Bundle bundle) {}
default void onMediaLongClick(Bundle bundle) {} default void onMediaLongClick(Bundle bundle) {}
default void onAlbumClick(Bundle bundle) {} default void onAlbumClick(Bundle bundle) {}
default void onAlbumLongClick(Bundle bundle) {} default void onAlbumLongClick(Bundle bundle) {}
default void onArtistClick(Bundle bundle) {} default void onArtistClick(Bundle bundle) {}
default void onArtistLongClick(Bundle bundle) {} default void onArtistLongClick(Bundle bundle) {}
default void onGenreClick(Bundle bundle) {} default void onGenreClick(Bundle bundle) {}
default void onPlaylistClick(Bundle bundle) {} default void onPlaylistClick(Bundle bundle) {}
default void onPlaylistLongClick(Bundle bundle) {} default void onPlaylistLongClick(Bundle bundle) {}
default void onYearClick(Bundle bundle) {} default void onYearClick(Bundle bundle) {}
default void onServerClick(Bundle bundle) {} default void onServerClick(Bundle bundle) {}
default void onServerLongClick(Bundle bundle) {} default void onServerLongClick(Bundle bundle) {}
default void onPodcastEpisodeClick(Bundle bundle) {} default void onPodcastEpisodeClick(Bundle bundle) {}
default void onPodcastEpisodeLongClick(Bundle bundle) {} default void onPodcastEpisodeLongClick(Bundle bundle) {}
default void onPodcastChannelClick(Bundle bundle) {} default void onPodcastChannelClick(Bundle bundle) {}
default void onPodcastChannelLongClick(Bundle bundle) {} default void onPodcastChannelLongClick(Bundle bundle) {}
default void onInternetRadioStationClick(Bundle bundle) {} default void onInternetRadioStationClick(Bundle bundle) {}
default void onInternetRadioStationLongClick(Bundle bundle) {} default void onInternetRadioStationLongClick(Bundle bundle) {}
default void onMusicFolderClick(Bundle bundle) {} default void onMusicFolderClick(Bundle bundle) {}
default void onMusicDirectoryClick(Bundle bundle) {} default void onMusicDirectoryClick(Bundle bundle) {}
default void onMusicIndexClick(Bundle bundle) {} default void onMusicIndexClick(Bundle bundle) {}
} }

View file

@ -1,6 +1,8 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
import androidx.annotation.Keep;
@Keep
public interface DecadesCallback { public interface DecadesCallback {
void onLoadYear(int year); default void onLoadYear(int year) {}
} }

View file

@ -1,10 +1,11 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
import androidx.annotation.Keep;
import java.util.List; import java.util.List;
@Keep
public interface MediaCallback { public interface MediaCallback {
default void onError(Exception exception) {}
void onError(Exception exception); default void onLoadMedia(List<?> media) {}
void onLoadMedia(List<?> media);
} }

View file

@ -1,5 +1,8 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
import androidx.annotation.Keep;
@Keep
public interface MediaIndexCallback { public interface MediaIndexCallback {
void onRecovery(int index); default void onRecovery(int index) {}
} }

View file

@ -1,6 +1,9 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
public interface PodcastCallback { import androidx.annotation.Keep;
void onDismiss(); @Keep
public interface PodcastCallback {
default void onDismiss() {}
} }

View file

@ -1,6 +1,9 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
public interface RadioCallback { import androidx.annotation.Keep;
void onDismiss(); @Keep
public interface RadioCallback {
default void onDismiss() {}
} }

View file

@ -1,8 +1,9 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
import androidx.annotation.Keep;
@Keep
public interface ScanCallback { public interface ScanCallback {
default void onError(Exception exception) {}
void onError(Exception exception); default void onSuccess(boolean isScanning, long count) {}
void onSuccess(boolean isScanning, long count);
} }

View file

@ -1,8 +1,9 @@
package com.cappielloantonio.tempo.interfaces; package com.cappielloantonio.tempo.interfaces;
import androidx.annotation.Keep;
@Keep
public interface SystemCallback { public interface SystemCallback {
default void onError(Exception exception) {}
void onError(Exception exception); default void onSuccess(String password, String token, String salt) {}
void onSuccess(String password, String token, String salt);
} }