[Android] Use interfaces as apparent type
Romain Vimont
git at videolan.org
Mon Dec 11 16:42:23 CET 2017
vlc-android | branch: master | Romain Vimont <rom at rom1v.com> | Thu Nov 9 17:12:06 2017 +0100| [8f305f5f5bd204a766306d31d9d9f568ae5c8dcb] | committer: Geoffrey Métais
Use interfaces as apparent type
Some specific implementations (like ArrayList and HashMap) were used
were the corresponding interfaces (List and Map) could fit.
As a consequence, it was not possible to use other implementations,
like that of Collections.EMPTY_LIST or Arrays.asList(…).
Therefore, use List or Map as apparent type where appropriate.
These changes only target the VLC app, not LibVLC.
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> https://code.videolan.org/videolan/vlc-android/commit/8f305f5f5bd204a766306d31d9d9f568ae5c8dcb
---
.../src/org/videolan/vlc/PlaybackService.java | 20 ++++---
.../src/org/videolan/vlc/SortableAdapter.java | 11 +++-
.../videolan/vlc/extensions/ExtensionsManager.java | 4 +-
.../src/org/videolan/vlc/gui/DebugLogActivity.java | 2 +-
.../src/org/videolan/vlc/gui/DiffUtilAdapter.kt | 11 ++--
.../src/org/videolan/vlc/gui/HistoryAdapter.java | 2 +-
.../videolan/vlc/gui/PlaybackServiceActivity.java | 3 +-
.../src/org/videolan/vlc/gui/PlaylistActivity.java | 8 +--
.../org/videolan/vlc/gui/audio/AlbumAdapter.java | 3 +-
.../vlc/gui/audio/AudioAlbumsSongsFragment.java | 6 +--
.../vlc/gui/audio/AudioBrowserAdapter.java | 40 +++++++-------
.../vlc/gui/audio/AudioBrowserFragment.java | 12 ++---
.../videolan/vlc/gui/audio/BaseAudioBrowser.java | 4 +-
.../videolan/vlc/gui/audio/PlaylistAdapter.java | 2 +
.../vlc/gui/browser/BaseBrowserAdapter.java | 19 +++----
.../vlc/gui/browser/BaseBrowserFragment.java | 25 ++++-----
.../videolan/vlc/gui/browser/ExtensionBrowser.java | 2 +-
.../vlc/gui/browser/FileBrowserFragment.java | 3 +-
.../vlc/gui/browser/NetworkBrowserFragment.java | 4 +-
.../vlc/gui/browser/StorageBrowserAdapter.java | 5 +-
.../videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 3 +-
.../vlc/gui/dialogs/SelectChapterDialog.java | 7 +--
.../org/videolan/vlc/gui/helpers/AudioUtil.java | 8 +--
.../org/videolan/vlc/gui/tv/MainTvActivity.java | 3 +-
.../vlc/gui/tv/MediaItemDetailsFragment.java | 4 +-
.../gui/tv/audioplayer/AudioPlayerActivity.java | 7 +--
.../vlc/gui/tv/audioplayer/PlaylistAdapter.java | 8 +--
.../vlc/gui/tv/browser/BrowserGridFragment.java | 5 +-
.../vlc/gui/tv/browser/SortedBrowserFragment.java | 5 +-
.../videolan/vlc/gui/video/VideoGridFragment.java | 12 ++---
.../videolan/vlc/gui/video/VideoListAdapter.java | 12 ++---
.../vlc/gui/video/VideoPlayerActivity.java | 11 ++--
.../vlc/gui/video/benchmark/BenchActivity.java | 8 +--
.../org/videolan/vlc/media/BrowserProvider.java | 4 +-
.../src/org/videolan/vlc/media/MediaDatabase.java | 26 ++++-----
.../src/org/videolan/vlc/media/MediaGroup.java | 4 +-
.../src/org/videolan/vlc/media/MediaUtils.java | 4 +-
.../org/videolan/vlc/media/MediaWrapperList.java | 4 +-
.../src/org/videolan/vlc/util/AndroidDevices.java | 6 +--
.../org/videolan/vlc/util/CustomDirectories.java | 5 +-
.../src/org/videolan/vlc/util/MediaItemFilter.java | 2 +-
.../org/videolan/vlc/util/SubtitlesDownloader.java | 61 +++++++++++-----------
vlc-android/src/org/videolan/vlc/util/Util.java | 10 ++--
.../src/org/videolan/vlc/util/VLCInstance.java | 1 +
.../src/org/videolan/vlc/util/VLCOptions.java | 1 +
45 files changed, 215 insertions(+), 192 deletions(-)
Diff: https://code.videolan.org/videolan/vlc-android/commit/8f305f5f5bd204a766306d31d9d9f568ae5c8dcb
More information about the Android
mailing list