diff options
author | Iván Ávalos <avalos@disroot.org> | 2023-01-08 17:00:11 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2023-01-08 17:00:11 -0600 |
commit | c6879f14223a82f9e67767fd7299606f6d43703a (patch) | |
tree | d47765638cbb886ef1f74e367890cc798aea2c7b | |
parent | f14affd3ca86202b9cb5eb627264618c6ab8f0c2 (diff) | |
download | dsub-c6879f14223a82f9e67767fd7299606f6d43703a.tar.gz dsub-c6879f14223a82f9e67767fd7299606f6d43703a.tar.bz2 dsub-c6879f14223a82f9e67767fd7299606f6d43703a.zip |
Migrate to AndroidX
65 files changed, 169 insertions, 203 deletions
diff --git a/ServerProxy b/ServerProxy -Subproject 08f66ee2da9aa39ae569c8ed2a2ad02f141e971 +Subproject 3eda98e59b269b269122334db5a983d81c4e7c0 diff --git a/app/build.gradle b/app/build.gradle index e380fdef..19f45111 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 30 + compileSdkVersion 33 defaultConfig { applicationId "me.avalos.dsub" - minSdkVersion 15 - targetSdkVersion 29 + minSdkVersion 26 + targetSdkVersion 33 versionCode 208 versionName '5.5.3' setProperty("archivesBaseName", "DSub $versionName") @@ -59,16 +59,21 @@ android { storeFile file('../debug.keystore') } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { implementation project(path: ':ServerProxy') implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:support-v4:27.1.+' - implementation 'com.android.support:appcompat-v7:27.1.+' - implementation 'com.android.support:mediarouter-v7:27.1.+' - implementation 'com.android.support:recyclerview-v7:27.1.+' - implementation 'com.android.support:design:27.1.+' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'androidx.mediarouter:mediarouter:1.3.1' + implementation 'androidx.recyclerview:recyclerview:1.2.1' + implementation 'com.google.android.material:material:1.6.0' googleImplementation 'com.google.android.gms:play-services-cast:8.1.0' implementation 'com.sothree.slidinguppanel:library:3.0.0' implementation 'de.hdodenhof:circleimageview:1.2.1' diff --git a/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java b/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java index 08db4f1c..f557bd31 100644 --- a/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java +++ b/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java @@ -1,7 +1,7 @@ package github.daneren2005.dsub.util.compat; import android.content.Context; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouter; import github.daneren2005.dsub.service.DownloadService; import github.daneren2005.dsub.service.RemoteController; diff --git a/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java b/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java index f8bd4ee7..6f1cf310 100644 --- a/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java +++ b/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java @@ -1,7 +1,7 @@ package github.daneren2005.dsub.util.compat; import android.content.Context; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouter; import android.util.Log; import com.google.android.gms.cast.CastDevice; diff --git a/app/src/main/java/github/daneren2005/dsub/activity/EditPlayActionActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/EditPlayActionActivity.java index 0396f8a4..bc56eeb7 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/EditPlayActionActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/EditPlayActionActivity.java @@ -16,12 +16,12 @@ package github.daneren2005.dsub.activity; import android.app.Activity; -import android.support.v7.app.AlertDialog; -import android.content.Context; +import androidx.appcompat.app.AlertDialog; + import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; -import android.support.v4.widget.DrawerLayout; +import androidx.drawerlayout.widget.DrawerLayout; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SettingsActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SettingsActivity.java index 595529b7..fb5a0169 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SettingsActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SettingsActivity.java @@ -21,7 +21,7 @@ package github.daneren2005.dsub.activity; import android.annotation.TargetApi; import android.os.Build; import android.os.Bundle; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import github.daneren2005.dsub.R; import github.daneren2005.dsub.fragments.PreferenceCompatFragment; diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 2416832d..167f3dd7 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -32,17 +32,17 @@ import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.os.Handler; -import android.support.design.widget.NavigationView; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.Toolbar; +import com.google.android.material.navigation.NavigationView; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 24495859..17e564e2 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -31,10 +31,10 @@ import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.provider.MediaStore; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.Toolbar; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.MenuItem; import android.view.View; diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java index 5ed79e82..0a8b9a54 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java @@ -16,7 +16,7 @@ package github.daneren2005.dsub.adapter; import android.content.Context; -import android.support.v7.widget.PopupMenu; +import androidx.appcompat.widget.PopupMenu; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -28,7 +28,6 @@ import java.util.List; import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.Artist; -import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.domain.MusicDirectory.Entry; import github.daneren2005.dsub.domain.MusicFolder; import github.daneren2005.dsub.util.Util; diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java index 33bbb384..af3690c3 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java @@ -19,8 +19,8 @@ import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Build; -import android.support.v7.view.ActionMode; -import android.support.v7.widget.RecyclerView; +import androidx.appcompat.view.ActionMode; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.util.TypedValue; import android.view.Menu; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/ChatFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/ChatFragment.java index 3208ffb7..efdf0c7f 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/ChatFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/ChatFragment.java @@ -9,7 +9,7 @@ import java.util.Collections; import java.util.List; import android.os.Bundle; import android.os.Handler; -import android.support.v4.widget.SwipeRefreshLayout; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/DownloadFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/DownloadFragment.java index 9e8f8c5b..4c37beec 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -18,7 +18,7 @@ package github.daneren2005.dsub.fragments; import android.content.DialogInterface; import android.os.Bundle; import android.os.Handler; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.recyclerview.widget.ItemTouchHelper; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index 1be883a0..bd6625d9 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -21,7 +21,7 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import android.annotation.TargetApi; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; @@ -29,11 +29,11 @@ import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.MediaRouteButton; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.core.view.MenuItemCompat; +import androidx.mediarouter.app.MediaRouteButton; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; import android.util.Log; import android.view.Display; import android.view.GestureDetector; @@ -51,7 +51,6 @@ import android.view.animation.AnimationUtils; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.PopupMenu; import android.widget.SeekBar; import android.widget.TextView; import android.widget.ViewFlipper; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SearchFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SearchFragment.java index dfff45cd..d4478032 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SearchFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SearchFragment.java @@ -3,17 +3,16 @@ package github.daneren2005.dsub.fragments; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import android.content.Intent; import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.core.view.MenuItemCompat; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -28,7 +27,6 @@ import github.daneren2005.dsub.adapter.EntryGridAdapter; import github.daneren2005.dsub.adapter.SearchAdapter; import github.daneren2005.dsub.adapter.SectionAdapter; import github.daneren2005.dsub.domain.Artist; -import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.domain.MusicDirectory.Entry; import github.daneren2005.dsub.domain.SearchCritera; import github.daneren2005.dsub.domain.SearchResult; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index dd4a717a..7192754e 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -1,17 +1,17 @@ package github.daneren2005.dsub.fragments; import android.annotation.TargetApi; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.text.Html; import android.text.SpannableString; import android.text.Spanned; @@ -45,7 +45,6 @@ import github.daneren2005.dsub.util.DrawableTint; import github.daneren2005.dsub.util.ImageLoader; import java.io.Serializable; -import java.util.Iterator; import java.util.List; import github.daneren2005.dsub.domain.PodcastEpisode; @@ -62,7 +61,6 @@ import github.daneren2005.dsub.util.UpdateHelper; import github.daneren2005.dsub.util.UserUtil; import github.daneren2005.dsub.util.Util; import github.daneren2005.dsub.view.FastScroller; -import github.daneren2005.dsub.view.GridSpacingDecoration; import github.daneren2005.dsub.view.MyLeadingMarginSpan2; import github.daneren2005.dsub.view.RecyclingImageView; import github.daneren2005.dsub.view.UpdateView; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java index 5cb413fe..206d030f 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java @@ -3,11 +3,11 @@ package github.daneren2005.dsub.fragments; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.content.res.Resources; import android.os.Bundle; -import android.support.v4.app.FragmentTransaction; +import androidx.fragment.app.FragmentTransaction; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java index 9011b4c5..2a47c2bd 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java @@ -15,10 +15,10 @@ package github.daneren2005.dsub.fragments; import android.content.res.Resources; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v7.widget.GridLayoutManager; +import androidx.recyclerview.widget.GridLayoutManager; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectRecyclerFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectRecyclerFragment.java index 0d4506ac..5e575af2 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectRecyclerFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectRecyclerFragment.java @@ -15,15 +15,12 @@ package github.daneren2005.dsub.fragments; -import android.app.SearchManager; -import android.app.SearchableInfo; -import android.content.Context; import android.os.Bundle; -import android.support.v4.view.MenuItemCompat; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SearchView; +import androidx.core.view.MenuItemCompat; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.SearchView; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java index f231fa33..5ee06c2d 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectShareFragment.java @@ -15,7 +15,7 @@ package github.daneren2005.dsub.fragments; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.view.Menu; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index f76677d5..89e35847 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -32,8 +32,8 @@ import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceCategory; import android.preference.PreferenceScreen; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.text.InputType; import android.util.Log; import android.view.View; diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index a8b21be9..76db7576 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -18,12 +18,11 @@ */ package github.daneren2005.dsub.fragments; -import android.annotation.TargetApi; import android.app.Activity; import android.app.SearchManager; import android.app.SearchableInfo; -import android.support.v4.view.MenuItemCompat; -import android.support.v7.app.AlertDialog; +import androidx.core.view.MenuItemCompat; +import androidx.appcompat.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -32,15 +31,14 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.media.MediaMetadataRetriever; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.os.StatFs; -import android.support.v4.app.Fragment; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SearchView; +import androidx.fragment.app.Fragment; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.SearchView; import android.util.Log; import android.view.GestureDetector; import android.view.Menu; @@ -53,7 +51,6 @@ import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; -import android.widget.RatingBar; import android.widget.TextView; import github.daneren2005.dsub.R; import github.daneren2005.dsub.activity.SubsonicActivity; @@ -85,12 +82,8 @@ import github.daneren2005.dsub.util.SongDBHandler; import github.daneren2005.dsub.util.UpdateHelper; import github.daneren2005.dsub.util.UserUtil; import github.daneren2005.dsub.util.Util; -import github.daneren2005.dsub.view.AlbumView; -import github.daneren2005.dsub.view.ArtistEntryView; -import github.daneren2005.dsub.view.ArtistView; import github.daneren2005.dsub.view.GridSpacingDecoration; import github.daneren2005.dsub.view.PlaylistSongView; -import github.daneren2005.dsub.view.SongView; import github.daneren2005.dsub.view.UpdateView; import java.io.File; diff --git a/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java b/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java index f4238c99..62aaeaf3 100644 --- a/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java +++ b/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java @@ -26,11 +26,11 @@ import android.content.ServiceConnection; import android.media.AudioManager; import android.media.MediaRouter; import android.os.IBinder; -import android.support.v7.media.MediaControlIntent; -import android.support.v7.media.MediaRouteDescriptor; -import android.support.v7.media.MediaRouteDiscoveryRequest; -import android.support.v7.media.MediaRouteProvider; -import android.support.v7.media.MediaRouteProviderDescriptor; +import androidx.mediarouter.media.MediaControlIntent; +import androidx.mediarouter.media.MediaRouteDescriptor; +import androidx.mediarouter.media.MediaRouteDiscoveryRequest; +import androidx.mediarouter.media.MediaRouteProvider; +import androidx.mediarouter.media.MediaRouteProviderDescriptor; import android.util.Log; import org.eclipse.jetty.util.log.Logger; @@ -327,7 +327,7 @@ public class DLNARouteProvider extends MediaRouteProvider { } @Override - public boolean onControlRequest(Intent intent, android.support.v7.media.MediaRouter.ControlRequestCallback callback) { + public boolean onControlRequest(Intent intent, androidx.mediarouter.media.MediaRouter.ControlRequestCallback callback) { if (intent.hasCategory(CATEGORY_DLNA)) { return true; } else { diff --git a/app/src/main/java/github/daneren2005/dsub/provider/JukeboxRouteProvider.java b/app/src/main/java/github/daneren2005/dsub/provider/JukeboxRouteProvider.java index 0d2a5ff5..527a0d51 100644 --- a/app/src/main/java/github/daneren2005/dsub/provider/JukeboxRouteProvider.java +++ b/app/src/main/java/github/daneren2005/dsub/provider/JukeboxRouteProvider.java @@ -23,10 +23,10 @@ import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; import android.media.MediaRouter; -import android.support.v7.media.MediaControlIntent; -import android.support.v7.media.MediaRouteDescriptor; -import android.support.v7.media.MediaRouteProvider; -import android.support.v7.media.MediaRouteProviderDescriptor; +import androidx.mediarouter.media.MediaControlIntent; +import androidx.mediarouter.media.MediaRouteDescriptor; +import androidx.mediarouter.media.MediaRouteProvider; +import androidx.mediarouter.media.MediaRouteProviderDescriptor; import github.daneren2005.dsub.domain.RemoteControlState; import github.daneren2005.dsub.service.DownloadService; @@ -86,7 +86,7 @@ public class JukeboxRouteProvider extends MediaRouteProvider { } @Override - public boolean onControlRequest(Intent intent, android.support.v7.media.MediaRouter.ControlRequestCallback callback) { + public boolean onControlRequest(Intent intent, androidx.mediarouter.media.MediaRouter.ControlRequestCallback callback) { if (intent.hasCategory(CATEGORY_JUKEBOX_ROUTE)) { return true; } else { diff --git a/app/src/main/java/github/daneren2005/dsub/service/AutoMediaBrowserService.java b/app/src/main/java/github/daneren2005/dsub/service/AutoMediaBrowserService.java index d2378ccb..4e64264d 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/AutoMediaBrowserService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/AutoMediaBrowserService.java @@ -22,9 +22,9 @@ import android.annotation.TargetApi; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.support.v4.media.MediaBrowserCompat; -import android.support.v4.media.MediaBrowserServiceCompat; +import androidx.media.MediaBrowserServiceCompat; import android.support.v4.media.MediaDescriptionCompat; import android.util.Log; diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index dbc1eacc..a566d763 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -18,7 +18,7 @@ */ package github.daneren2005.dsub.service; -import static android.support.v7.media.MediaRouter.RouteInfo; +import static androidx.mediarouter.media.MediaRouter.RouteInfo; import static github.daneren2005.dsub.domain.PlayerState.COMPLETED; import static github.daneren2005.dsub.domain.PlayerState.DOWNLOADING; import static github.daneren2005.dsub.domain.PlayerState.IDLE; @@ -72,7 +72,6 @@ import java.util.TimerTask; import java.util.concurrent.CopyOnWriteArrayList; import android.annotation.TargetApi; -import android.app.Activity; import android.app.Service; import android.content.ComponentCallbacks2; import android.content.ComponentName; @@ -90,10 +89,10 @@ import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.PowerManager; -import android.support.v7.media.MediaRouteSelector; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouteSelector; +import androidx.mediarouter.media.MediaRouter; import android.util.Log; -import android.support.v4.util.LruCache; +import androidx.collection.LruCache; import android.view.KeyEvent; /** diff --git a/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java b/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java index 0e80295a..dd7706bb 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java +++ b/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java @@ -1,8 +1,7 @@ package github.daneren2005.dsub.util; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; -import android.util.Log; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; import java.util.Queue; diff --git a/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java b/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java index f03906a8..8f7e645c 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java +++ b/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java @@ -20,9 +20,9 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; import android.util.TypedValue; import java.util.HashMap; diff --git a/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java b/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java index 85786b12..f9e25d68 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java +++ b/app/src/main/java/github/daneren2005/dsub/util/FileUtil.java @@ -43,7 +43,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Build; import android.os.Environment; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import github.daneren2005.dsub.domain.Artist; import github.daneren2005.dsub.domain.Genre; diff --git a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java index 00858f9c..b0a7d174 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java +++ b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java @@ -34,13 +34,11 @@ import android.os.Handler; import android.os.Looper; import android.util.DisplayMetrics; import android.util.Log; -import android.support.v4.util.LruCache; +import androidx.collection.LruCache; import android.view.View; import android.widget.ImageView; import android.widget.TextView; -import java.lang.ref.WeakReference; - import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.ArtistInfo; import github.daneren2005.dsub.domain.InternetRadioStation; diff --git a/app/src/main/java/github/daneren2005/dsub/util/KeyStoreUtil.java b/app/src/main/java/github/daneren2005/dsub/util/KeyStoreUtil.java index 8ff9ec69..b392bb57 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/KeyStoreUtil.java +++ b/app/src/main/java/github/daneren2005/dsub/util/KeyStoreUtil.java @@ -3,7 +3,7 @@ package github.daneren2005.dsub.util; import android.annotation.TargetApi; import android.security.keystore.KeyGenParameterSpec; import android.security.keystore.KeyProperties; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import android.util.Log; diff --git a/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java b/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java index 00e02dab..cf180eac 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java +++ b/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java @@ -16,9 +16,9 @@ package github.daneren2005.dsub.util; import android.os.Build; -import android.support.v7.media.MediaRouteProvider; -import android.support.v7.media.MediaRouteSelector; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouteProvider; +import androidx.mediarouter.media.MediaRouteSelector; +import androidx.mediarouter.media.MediaRouter; import java.util.ArrayList; import java.util.List; @@ -30,7 +30,7 @@ import github.daneren2005.dsub.service.DownloadService; import github.daneren2005.dsub.service.RemoteController; import github.daneren2005.dsub.util.compat.GoogleCompat; -import static android.support.v7.media.MediaRouter.RouteInfo; +import static androidx.mediarouter.media.MediaRouter.RouteInfo; /** * Created by owner on 2/8/14. diff --git a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java index 88bc8138..4467477b 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java @@ -26,14 +26,13 @@ import android.content.Intent; import android.graphics.Bitmap; import android.os.Build; import android.os.Handler; -import android.support.v4.app.NotificationCompat; +import androidx.core.app.NotificationCompat; +import androidx.media.app.NotificationCompat.MediaStyle; + import android.util.Log; import android.view.KeyEvent; import android.view.View; -import android.view.ViewGroup; -import android.widget.LinearLayout; import android.widget.RemoteViews; -import android.widget.TextView; import github.daneren2005.dsub.R; import github.daneren2005.dsub.activity.SubsonicActivity; @@ -82,7 +81,7 @@ public final class Notifications { if (usingMediaStyleNotification) { RemoteControlClientLP remoteControlClient = (RemoteControlClientLP) downloadService.getRemoteControlClient(); - android.support.v4.media.app.NotificationCompat.MediaStyle mediaStyle = new android.support.v4.media.app.NotificationCompat.MediaStyle() + MediaStyle mediaStyle = new MediaStyle() .setMediaSession(remoteControlClient.getMediaSession().getSessionToken()); if (isSingle) { @@ -99,7 +98,7 @@ public final class Notifications { .setSmallIcon(R.drawable.stat_notify_playing) .setContentTitle(title) .setContentText(artist + " - " + album) - .setVisibility(Notification.VISIBILITY_PUBLIC) + .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setStyle(mediaStyle); // Set the album art. diff --git a/app/src/main/java/github/daneren2005/dsub/util/SyncUtil.java b/app/src/main/java/github/daneren2005/dsub/util/SyncUtil.java index a369715f..60ff603f 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/SyncUtil.java +++ b/app/src/main/java/github/daneren2005/dsub/util/SyncUtil.java @@ -1,19 +1,14 @@ package github.daneren2005.dsub.util; -import android.app.NotificationManager; -import android.app.PendingIntent; import android.content.Context; -import android.content.Intent; -import android.support.v4.app.NotificationCompat; + +import androidx.core.app.NotificationCompat; import java.io.File; import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import github.daneren2005.dsub.R; -import github.daneren2005.dsub.activity.SubsonicFragmentActivity; - /** * Created by Scott on 11/24/13. */ diff --git a/app/src/main/java/github/daneren2005/dsub/util/UpdateHelper.java b/app/src/main/java/github/daneren2005/dsub/util/UpdateHelper.java index 4cf25b30..b335b54b 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/UpdateHelper.java +++ b/app/src/main/java/github/daneren2005/dsub/util/UpdateHelper.java @@ -22,7 +22,7 @@ package github.daneren2005.dsub.util; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.View; import android.widget.RatingBar; @@ -33,9 +33,7 @@ import java.util.List; import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.Artist; -import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.domain.MusicDirectory.Entry; -import github.daneren2005.dsub.fragments.SubsonicFragment; import github.daneren2005.dsub.service.DownloadFile; import github.daneren2005.dsub.service.DownloadService; import github.daneren2005.dsub.service.MusicService; diff --git a/app/src/main/java/github/daneren2005/dsub/util/UserUtil.java b/app/src/main/java/github/daneren2005/dsub/util/UserUtil.java index 0775c956..d5003f49 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/UserUtil.java +++ b/app/src/main/java/github/daneren2005/dsub/util/UserUtil.java @@ -16,13 +16,13 @@ package github.daneren2005.dsub.util; import android.app.Activity; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java index 7989e8c9..7fc3a593 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Util.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java @@ -21,9 +21,9 @@ import android.annotation.TargetApi; import android.app.Activity; import android.media.AudioAttributes; import android.media.AudioFocusRequest; -import android.support.annotation.RequiresApi; -import android.support.annotation.StringRes; -import android.support.v7.app.AlertDialog; +import androidx.annotation.RequiresApi; +import androidx.annotation.StringRes; +import androidx.appcompat.app.AlertDialog; import android.content.ClipboardManager; import android.content.ClipData; import android.content.ComponentName; @@ -39,7 +39,6 @@ import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.media.AudioManager.OnAudioFocusChangeListener; import android.net.ConnectivityManager; -import android.net.Network; import android.net.NetworkInfo; import android.net.wifi.WifiManager; import android.os.Build; diff --git a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientBase.java b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientBase.java index 4f9a27f0..3e57e185 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientBase.java +++ b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientBase.java @@ -6,7 +6,7 @@ import github.daneren2005.dsub.service.DownloadFile; import android.content.ComponentName; import android.content.Context; import android.graphics.Bitmap; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouter; import android.os.Build; import java.util.List; diff --git a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java index 74076afb..7585f971 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java +++ b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java @@ -13,7 +13,7 @@ import android.graphics.Bitmap; import android.media.AudioManager; import android.media.MediaMetadataRetriever; import android.media.RemoteControlClient; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouter; import java.util.List; diff --git a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java index a42b4832..52afb81c 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java +++ b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java @@ -30,12 +30,12 @@ import android.media.RemoteControlClient; import android.os.Build; import android.os.Bundle; import android.provider.MediaStore; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.support.v4.media.MediaDescriptionCompat; import android.support.v4.media.MediaMetadataCompat; import android.support.v4.media.session.MediaSessionCompat; import android.support.v4.media.session.PlaybackStateCompat; -import android.support.v7.media.MediaRouter; +import androidx.mediarouter.media.MediaRouter; import android.util.Log; import android.view.KeyEvent; diff --git a/app/src/main/java/github/daneren2005/dsub/view/AutoRepeatButton.java b/app/src/main/java/github/daneren2005/dsub/view/AutoRepeatButton.java index c66f383f..476bbad0 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/AutoRepeatButton.java +++ b/app/src/main/java/github/daneren2005/dsub/view/AutoRepeatButton.java @@ -4,9 +4,8 @@ import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; -import android.widget.ImageButton; -public class AutoRepeatButton extends android.support.v7.widget.AppCompatImageButton { +public class AutoRepeatButton extends androidx.appcompat.widget.AppCompatImageButton { private static final long initialRepeatDelay = 1000; private static final long repeatIntervalInMilliseconds = 300; diff --git a/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java b/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java index 002f0245..06960368 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java +++ b/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java @@ -17,9 +17,8 @@ package github.daneren2005.dsub.view; import android.content.Context; import android.os.Build; import android.os.Environment; -import android.preference.DialogPreference; import android.preference.EditTextPreference; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; @@ -28,12 +27,10 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; -import android.widget.TextView; import java.io.File; import github.daneren2005.dsub.R; -import github.daneren2005.dsub.util.FileUtil; public class CacheLocationPreference extends EditTextPreference { private static final String TAG = CacheLocationPreference.class.getSimpleName(); diff --git a/app/src/main/java/github/daneren2005/dsub/view/ChangeLog.java b/app/src/main/java/github/daneren2005/dsub/view/ChangeLog.java index e3d24485..840bb218 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/ChangeLog.java +++ b/app/src/main/java/github/daneren2005/dsub/view/ChangeLog.java @@ -33,16 +33,14 @@ package github.daneren2005.dsub.view; import java.io.IOException; -import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; -import org.xmlpull.v1.XmlPullParserFactory; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; diff --git a/app/src/main/java/github/daneren2005/dsub/view/ErrorDialog.java b/app/src/main/java/github/daneren2005/dsub/view/ErrorDialog.java index 3d6eaa52..ccdbb2b3 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/ErrorDialog.java +++ b/app/src/main/java/github/daneren2005/dsub/view/ErrorDialog.java @@ -19,7 +19,7 @@ package github.daneren2005.dsub.view; import android.app.Activity; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; diff --git a/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java b/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java index d3eacefc..a8f2635a 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java +++ b/app/src/main/java/github/daneren2005/dsub/view/FastScroller.java @@ -17,14 +17,12 @@ package github.daneren2005.dsub.view; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; -import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.AdapterDataObserver; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.AdapterDataObserver; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; @@ -36,7 +34,7 @@ import android.widget.TextView; import github.daneren2005.dsub.R; -import static android.support.v7.widget.RecyclerView.OnScrollListener; +import static androidx.recyclerview.widget.RecyclerView.OnScrollListener; public class FastScroller extends LinearLayout { private static final String TAG = FastScroller.class.getSimpleName(); diff --git a/app/src/main/java/github/daneren2005/dsub/view/GridSpacingDecoration.java b/app/src/main/java/github/daneren2005/dsub/view/GridSpacingDecoration.java index 45b34b9f..de32a644 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/GridSpacingDecoration.java +++ b/app/src/main/java/github/daneren2005/dsub/view/GridSpacingDecoration.java @@ -16,17 +16,15 @@ package github.daneren2005.dsub.view; import android.graphics.Rect; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.util.Log; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; -import static android.widget.LinearLayout.*; - public class GridSpacingDecoration extends RecyclerView.ItemDecoration { private static final String TAG = GridSpacingDecoration.class.getSimpleName(); public static final int SPACING = 10; diff --git a/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java b/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java index 0041eac5..a4727643 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java +++ b/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java @@ -22,7 +22,7 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Looper; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteChooserDialogFragment.java b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteChooserDialogFragment.java index a2c898b9..35c9b292 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteChooserDialogFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteChooserDialogFragment.java @@ -2,11 +2,10 @@ package github.daneren2005.dsub.view.compat; import android.content.Context; import android.os.Bundle; -import android.support.v7.app.MediaRouteChooserDialog; -import android.support.v7.app.MediaRouteChooserDialogFragment; +import androidx.mediarouter.app.MediaRouteChooserDialog; +import androidx.mediarouter.app.MediaRouteChooserDialogFragment; import github.daneren2005.dsub.util.ThemeUtil; -import github.daneren2005.dsub.util.Util; public class CustomMediaRouteChooserDialogFragment extends MediaRouteChooserDialogFragment { @Override diff --git a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteControllerDialogFragment.java b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteControllerDialogFragment.java index ea890b9f..c85e7c62 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteControllerDialogFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteControllerDialogFragment.java @@ -2,11 +2,10 @@ package github.daneren2005.dsub.view.compat; import android.content.Context; import android.os.Bundle; -import android.support.v7.app.MediaRouteControllerDialog; -import android.support.v7.app.MediaRouteControllerDialogFragment; +import androidx.mediarouter.app.MediaRouteControllerDialog; +import androidx.mediarouter.app.MediaRouteControllerDialogFragment; import github.daneren2005.dsub.util.ThemeUtil; -import github.daneren2005.dsub.util.Util; public class CustomMediaRouteControllerDialogFragment extends MediaRouteControllerDialogFragment { @Override diff --git a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteDialogFactory.java b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteDialogFactory.java index 8bc890cb..a39b1044 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteDialogFactory.java +++ b/app/src/main/java/github/daneren2005/dsub/view/compat/CustomMediaRouteDialogFactory.java @@ -1,8 +1,8 @@ package github.daneren2005.dsub.view.compat; -import android.support.v7.app.MediaRouteChooserDialogFragment; -import android.support.v7.app.MediaRouteControllerDialogFragment; -import android.support.v7.app.MediaRouteDialogFactory; +import androidx.mediarouter.app.MediaRouteChooserDialogFragment; +import androidx.mediarouter.app.MediaRouteControllerDialogFragment; +import androidx.mediarouter.app.MediaRouteDialogFactory; public class CustomMediaRouteDialogFactory extends MediaRouteDialogFactory { @Override diff --git a/app/src/main/res/layout/abstract_activity.xml b/app/src/main/res/layout/abstract_activity.xml index 56db1439..35fbedd3 100644 --- a/app/src/main/res/layout/abstract_activity.xml +++ b/app/src/main/res/layout/abstract_activity.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.v4.widget.DrawerLayout +<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" @@ -14,9 +14,9 @@ android:layout_height="match_parent"/> <!-- The navigation drawer --> - <android.support.design.widget.NavigationView + <com.google.android.material.navigation.NavigationView android:id="@+id/left_drawer" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start"/> -</android.support.v4.widget.DrawerLayout> +</androidx.drawerlayout.widget.DrawerLayout> diff --git a/app/src/main/res/layout/abstract_fragment_activity.xml b/app/src/main/res/layout/abstract_fragment_activity.xml index ae6647c4..1ce7d9e7 100644 --- a/app/src/main/res/layout/abstract_fragment_activity.xml +++ b/app/src/main/res/layout/abstract_fragment_activity.xml @@ -14,7 +14,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <android.support.v7.widget.Toolbar + <androidx.appcompat.widget.Toolbar android:id="@+id/main_toolbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" @@ -38,7 +38,7 @@ android:layout_height="wrap_content" android:background="?attr/actionbarBackgroundColor"> - <android.support.v7.widget.Toolbar + <androidx.appcompat.widget.Toolbar android:id="@+id/now_playing_toolbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" diff --git a/app/src/main/res/layout/abstract_fullscreen_activity.xml b/app/src/main/res/layout/abstract_fullscreen_activity.xml index 7ca9b936..7eb93b11 100644 --- a/app/src/main/res/layout/abstract_fullscreen_activity.xml +++ b/app/src/main/res/layout/abstract_fullscreen_activity.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.v4.widget.DrawerLayout +<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" @@ -13,9 +13,9 @@ android:layout_height="match_parent"/> <!-- The navigation drawer --> - <android.support.design.widget.NavigationView + <com.google.android.material.navigation.NavigationView android:id="@+id/left_drawer" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start"/> -</android.support.v4.widget.DrawerLayout> +</androidx.drawerlayout.widget.DrawerLayout> diff --git a/app/src/main/res/layout/abstract_recycler_fragment.xml b/app/src/main/res/layout/abstract_recycler_fragment.xml index 0a443ed6..f49f2a25 100644 --- a/app/src/main/res/layout/abstract_recycler_fragment.xml +++ b/app/src/main/res/layout/abstract_recycler_fragment.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/refresh_layout" android:layout_width="fill_parent" android:layout_height="fill_parent"> @@ -15,7 +15,7 @@ android:layout_height="0dip" android:layout_weight="1.0"> - <android.support.v7.widget.RecyclerView + <androidx.recyclerview.widget.RecyclerView android:id="@+id/fragment_recycler" android:layout_width="fill_parent" android:layout_height="fill_parent" @@ -33,4 +33,4 @@ <include layout="@layout/tab_progress" /> </LinearLayout> -</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file +</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/chat.xml b/app/src/main/res/layout/chat.xml index 89ad77ac..c4782855 100644 --- a/app/src/main/res/layout/chat.xml +++ b/app/src/main/res/layout/chat.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/refresh_layout" android:layout_width="fill_parent" android:layout_height="fill_parent"> @@ -50,4 +50,4 @@ </LinearLayout> </LinearLayout> -</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file +</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/create_user.xml b/app/src/main/res/layout/create_user.xml index 7d77ade9..8a97ad5a 100644 --- a/app/src/main/res/layout/create_user.xml +++ b/app/src/main/res/layout/create_user.xml @@ -70,7 +70,7 @@ android:textColor="?android:textColorPrimary"/> </LinearLayout> - <android.support.v7.widget.RecyclerView + <androidx.recyclerview.widget.RecyclerView android:id="@+id/settings_list" android:layout_width="fill_parent" android:layout_height="0dip" diff --git a/app/src/main/res/layout/download_playlist.xml b/app/src/main/res/layout/download_playlist.xml index 161056db..301503ec 100644 --- a/app/src/main/res/layout/download_playlist.xml +++ b/app/src/main/res/layout/download_playlist.xml @@ -24,7 +24,7 @@ android:layout_height="0dip" android:layout_weight="1.0"> - <android.support.v7.widget.RecyclerView + <androidx.recyclerview.widget.RecyclerView android:id="@+id/download_list" android:layout_width="fill_parent" android:layout_height="fill_parent" diff --git a/app/src/main/res/layout/settings_activity.xml b/app/src/main/res/layout/settings_activity.xml index bdcc4a23..2100e73d 100644 --- a/app/src/main/res/layout/settings_activity.xml +++ b/app/src/main/res/layout/settings_activity.xml @@ -4,7 +4,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - <android.support.v7.widget.Toolbar + <androidx.appcompat.widget.Toolbar android:id="@+id/main_toolbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" diff --git a/app/src/main/res/menu/abstract_top_menu.xml b/app/src/main/res/menu/abstract_top_menu.xml index b768879d..0d7e1cd2 100644 --- a/app/src/main/res/menu/abstract_top_menu.xml +++ b/app/src/main/res/menu/abstract_top_menu.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_global_search" android:icon="?attr/search" android:title="@string/menu.search" - compat:actionViewClass="android.support.v7.widget.SearchView" + compat:actionViewClass="androidx.appcompat.widget.SearchView" compat:showAsAction="always|collapseActionView"/> <group android:id="@+id/not_touchscreen"> diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml index b264d4fa..bd1b9721 100644 --- a/app/src/main/res/menu/main.xml +++ b/app/src/main/res/menu/main.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_global_search" android:icon="?attr/search" android:title="@string/menu.search" - compat:actionViewClass="android.support.v7.widget.SearchView" + compat:actionViewClass="androidx.appcompat.widget.SearchView" compat:showAsAction="ifRoom|collapseActionView"/> <item diff --git a/app/src/main/res/menu/nowplaying.xml b/app/src/main/res/menu/nowplaying.xml index 9c198e9a..4772c8cf 100644 --- a/app/src/main/res/menu/nowplaying.xml +++ b/app/src/main/res/menu/nowplaying.xml @@ -11,8 +11,8 @@ <item android:id="@+id/menu_mediaroute" - compat:actionProviderClass="android.support.v7.app.MediaRouteActionProvider" - compat:actionViewClass="android.support.v7.app.MediaRouteButton" + compat:actionProviderClass="androidx.mediarouter.app.MediaRouteActionProvider" + compat:actionViewClass="androidx.mediarouter.app.MediaRouteButton" compat:showAsAction="always" android:title="@string/menu.cast"/> diff --git a/app/src/main/res/menu/nowplaying_offline.xml b/app/src/main/res/menu/nowplaying_offline.xml index d1f6f706..686f769b 100644 --- a/app/src/main/res/menu/nowplaying_offline.xml +++ b/app/src/main/res/menu/nowplaying_offline.xml @@ -10,8 +10,8 @@ <item android:id="@+id/menu_mediaroute" - compat:actionProviderClass="android.support.v7.app.MediaRouteActionProvider" - compat:actionViewClass="android.support.v7.app.MediaRouteButton" + compat:actionProviderClass="androidx.mediarouter.app.MediaRouteActionProvider" + compat:actionViewClass="androidx.mediarouter.app.MediaRouteButton" compat:showAsAction="always" android:title="@string/menu.cast"/> diff --git a/app/src/main/res/menu/search.xml b/app/src/main/res/menu/search.xml index b957a1e4..23b4aa68 100644 --- a/app/src/main/res/menu/search.xml +++ b/app/src/main/res/menu/search.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_global_search" android:icon="?attr/search" android:title="@string/menu.search" - compat:actionViewClass="android.support.v7.widget.SearchView" + compat:actionViewClass="androidx.appcompat.widget.SearchView" compat:showAsAction="always|collapseActionView"/> <item diff --git a/app/src/main/res/menu/select_artist.xml b/app/src/main/res/menu/select_artist.xml index e974c28e..6c0d152d 100644 --- a/app/src/main/res/menu/select_artist.xml +++ b/app/src/main/res/menu/select_artist.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_global_search" android:icon="?attr/search" android:title="@string/menu.search" - compat:actionViewClass="android.support.v7.widget.SearchView" + compat:actionViewClass="androidx.appcompat.widget.SearchView" compat:showAsAction="ifRoom|collapseActionView"/> <item diff --git a/app/src/main/res/menu/select_podcasts.xml b/app/src/main/res/menu/select_podcasts.xml index 25bb6188..35676ac7 100644 --- a/app/src/main/res/menu/select_podcasts.xml +++ b/app/src/main/res/menu/select_podcasts.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_global_search" android:icon="?attr/search" android:title="@string/menu.search" - compat:actionViewClass="android.support.v7.widget.SearchView" + compat:actionViewClass="androidx.appcompat.widget.SearchView" compat:showAsAction="ifRoom|collapseActionView"/> <item diff --git a/gradle.properties b/gradle.properties index 5369ced6..4700d213 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,6 +11,8 @@ # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs = -Xmx3072m # When configured, Gradle will run in incubating parallel mode. |