From bf2a3ca04326442b32a139c1cd94c30596c000e2 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 4 Oct 2019 14:59:08 +0200 Subject: [PATCH] Migrate to AndroidX --- .gitignore | 1 - app/build.gradle | 32 +++++++++---------- .../schabi/newpipe/report/ErrorInfoTest.java | 4 +-- .../java/org/schabi/newpipe/DebugApp.java | 4 +-- app/src/main/AndroidManifest.xml | 4 +-- .../material/appbar}/FlingBehavior.java | 6 ++-- app/src/main/java/org/schabi/newpipe/App.java | 5 ++- .../java/org/schabi/newpipe/BaseFragment.java | 8 ++--- .../newpipe/CheckForNewAppVersionTask.java | 9 ++---- .../java/org/schabi/newpipe/Downloader.java | 3 +- .../java/org/schabi/newpipe/MainActivity.java | 18 +++++------ .../org/schabi/newpipe/NewPipeDatabase.java | 4 +-- .../org/schabi/newpipe/ReCaptchaActivity.java | 9 +++--- .../org/schabi/newpipe/RouterActivity.java | 16 ++++++---- .../schabi/newpipe/about/AboutActivity.java | 20 ++++++------ .../schabi/newpipe/about/LicenseFragment.java | 4 +-- .../newpipe/about/LicenseFragmentHelper.java | 4 +-- .../schabi/newpipe/database/AppDatabase.java | 6 ++-- .../org/schabi/newpipe/database/BasicDAO.java | 10 +++--- .../schabi/newpipe/database/Converters.java | 2 +- .../schabi/newpipe/database/Migrations.java | 6 ++-- .../history/dao/SearchHistoryDAO.java | 6 ++-- .../history/dao/StreamHistoryDAO.java | 6 ++-- .../history/model/SearchHistoryEntry.java | 10 +++--- .../history/model/StreamHistoryEntity.java | 14 ++++---- .../history/model/StreamHistoryEntry.java | 2 +- .../playlist/PlaylistMetadataEntry.java | 2 +- .../playlist/PlaylistStreamEntry.java | 2 +- .../database/playlist/dao/PlaylistDAO.java | 4 +-- .../playlist/dao/PlaylistRemoteDAO.java | 6 ++-- .../playlist/dao/PlaylistStreamDAO.java | 6 ++-- .../playlist/model/PlaylistEntity.java | 8 ++--- .../playlist/model/PlaylistRemoteEntity.java | 10 +++--- .../playlist/model/PlaylistStreamEntity.java | 10 +++--- .../stream/StreamStatisticsEntry.java | 2 +- .../database/stream/dao/StreamDAO.java | 10 +++--- .../database/stream/dao/StreamStateDAO.java | 10 +++--- .../database/stream/model/StreamEntity.java | 10 +++--- .../stream/model/StreamStateEntity.java | 10 +++--- .../subscription/SubscriptionDAO.java | 10 +++--- .../subscription/SubscriptionEntity.java | 12 +++---- .../newpipe/download/DownloadActivity.java | 6 ++-- .../newpipe/download/DownloadDialog.java | 18 +++++------ .../newpipe/fragments/BaseStateFragment.java | 5 ++- .../newpipe/fragments/BlankFragment.java | 2 +- .../newpipe/fragments/EmptyFragment.java | 2 +- .../newpipe/fragments/MainFragment.java | 18 +++++------ .../fragments/OnScrollBelowItemsListener.java | 6 ++-- .../newpipe/fragments/detail/TabAdaptor.java | 8 ++--- .../fragments/detail/VideoDetailFragment.java | 22 ++++++------- .../fragments/list/BaseListFragment.java | 12 +++---- .../fragments/list/BaseListInfoFragment.java | 2 +- .../list/channel/ChannelFragment.java | 8 ++--- .../list/comments/CommentsFragment.java | 4 +-- .../fragments/list/kiosk/KioskFragment.java | 6 ++-- .../list/playlist/PlaylistFragment.java | 7 ++-- .../fragments/list/search/SearchFragment.java | 16 +++++----- .../list/search/SuggestionListAdapter.java | 4 +-- .../list/videos/RelatedVideosFragment.java | 4 +-- .../newpipe/info_list/InfoItemBuilder.java | 2 +- .../newpipe/info_list/InfoItemDialog.java | 4 +-- .../newpipe/info_list/InfoListAdapter.java | 8 ++--- .../holder/CommentsMiniInfoItemHolder.java | 2 +- .../info_list/holder/InfoItemHolder.java | 2 +- .../holder/StreamMiniInfoItemHolder.java | 2 +- .../newpipe/local/BaseLocalListFragment.java | 10 +++--- .../newpipe/local/HeaderFooterHolder.java | 2 +- .../newpipe/local/LocalItemListAdapter.java | 8 ++--- .../local/bookmark/BookmarkFragment.java | 6 ++-- .../local/dialog/PlaylistAppendDialog.java | 8 ++--- .../local/dialog/PlaylistCreationDialog.java | 4 +-- .../newpipe/local/dialog/PlaylistDialog.java | 6 ++-- .../newpipe/local/feed/FeedFragment.java | 8 ++--- .../local/history/HistoryEntryAdapter.java | 6 ++-- .../local/history/HistoryListener.java | 2 +- .../local/history/HistoryRecordManager.java | 3 +- .../history/StatisticsPlaylistFragment.java | 9 +++--- .../newpipe/local/holder/LocalItemHolder.java | 2 +- .../holder/LocalPlaylistStreamItemHolder.java | 2 +- .../LocalStatisticStreamItemHolder.java | 4 +-- .../local/playlist/LocalPlaylistFragment.java | 10 +++--- .../local/playlist/LocalPlaylistManager.java | 2 +- .../ImportConfirmationDialog.java | 8 ++--- .../subscription/ImportExportJsonHelper.java | 2 +- .../subscription/SubscriptionFragment.java | 18 +++++------ .../subscription/SubscriptionService.java | 4 +-- .../SubscriptionsImportFragment.java | 10 +++--- .../services/BaseImportExportService.java | 10 +++--- .../services/SubscriptionsExportService.java | 2 +- .../services/SubscriptionsImportService.java | 6 ++-- .../newpipe/player/BackgroundPlayer.java | 6 ++-- .../org/schabi/newpipe/player/BasePlayer.java | 4 +-- .../newpipe/player/MainVideoPlayer.java | 16 +++++----- .../newpipe/player/PlayerServiceBinder.java | 2 +- .../schabi/newpipe/player/PlayerState.java | 4 +-- .../newpipe/player/PopupVideoPlayer.java | 6 ++-- .../newpipe/player/ServicePlayerActivity.java | 10 +++--- .../schabi/newpipe/player/VideoPlayer.java | 6 ++-- .../newpipe/player/helper/AudioReactor.java | 2 +- .../newpipe/player/helper/CacheFactory.java | 2 +- .../player/helper/MediaSessionManager.java | 6 ++-- .../helper/PlaybackParameterDialog.java | 8 ++--- .../player/helper/PlayerDataSource.java | 2 +- .../newpipe/player/helper/PlayerHelper.java | 6 ++-- .../mediasession/PlayQueueNavigator.java | 4 +-- .../player/mediasource/FailedMediaSource.java | 4 +-- .../player/mediasource/LoadedMediaSource.java | 4 +-- .../mediasource/ManagedMediaSource.java | 2 +- .../ManagedMediaSourcePlaylist.java | 4 +-- .../mediasource/PlaceholderMediaSource.java | 4 +-- .../player/playback/CustomTrackSelector.java | 2 +- .../player/playback/MediaSourceManager.java | 6 ++-- .../player/playback/PlaybackListener.java | 4 +-- .../newpipe/player/playqueue/PlayQueue.java | 4 +-- .../player/playqueue/PlayQueueAdapter.java | 2 +- .../player/playqueue/PlayQueueItem.java | 4 +-- .../player/playqueue/PlayQueueItemHolder.java | 2 +- .../playqueue/PlayQueueItemTouchCallback.java | 4 +-- .../resolver/AudioPlaybackResolver.java | 4 +-- .../player/resolver/MediaSourceTag.java | 4 +-- .../player/resolver/PlaybackResolver.java | 4 +-- .../newpipe/player/resolver/Resolver.java | 4 +-- .../resolver/VideoPlaybackResolver.java | 5 ++- .../newpipe/report/AcraReportSender.java | 2 +- .../report/AcraReportSenderFactory.java | 2 +- .../schabi/newpipe/report/ErrorActivity.java | 14 ++++---- .../settings/AppearanceSettingsFragment.java | 4 +-- .../settings/BasePreferenceFragment.java | 8 ++--- .../settings/ContentSettingsFragment.java | 6 ++-- .../settings/DownloadSettingsFragment.java | 6 ++-- .../settings/HistorySettingsFragment.java | 6 ++-- .../settings/MainSettingsFragment.java | 2 +- .../newpipe/settings/NewPipeSettings.java | 2 +- .../settings/SelectChannelFragment.java | 8 ++--- .../newpipe/settings/SelectKioskFragment.java | 8 ++--- .../newpipe/settings/SettingsActivity.java | 12 +++---- .../settings/UpdateSettingsFragment.java | 5 ++- .../newpipe/settings/tabs/AddTabDialog.java | 6 ++-- .../settings/tabs/ChooseTabsFragment.java | 24 +++++++------- .../org/schabi/newpipe/settings/tabs/Tab.java | 8 ++--- .../newpipe/settings/tabs/TabsJsonHelper.java | 2 +- .../schabi/newpipe/streams/WebMWriter.java | 2 +- .../schabi/newpipe/util/AnimationUtils.java | 8 ++--- .../newpipe/util/FallbackViewHolder.java | 2 +- .../util/FilePickerActivityHelper.java | 10 +++--- .../org/schabi/newpipe/util/InfoCache.java | 6 ++-- .../util/LayoutManagerSmoothScroller.java | 6 ++-- .../org/schabi/newpipe/util/ListHelper.java | 2 +- .../org/schabi/newpipe/util/Localization.java | 6 ++-- .../schabi/newpipe/util/NavigationHelper.java | 12 +++---- .../schabi/newpipe/util/OnClickGesture.java | 2 +- .../schabi/newpipe/util/PermissionHelper.java | 6 ++-- .../newpipe/util/SecondaryStreamHelper.java | 2 +- .../schabi/newpipe/util/SerializedCache.java | 6 ++-- .../schabi/newpipe/util/ServiceHelper.java | 4 +-- .../org/schabi/newpipe/util/StateSaver.java | 4 +-- .../newpipe/util/StreamDialogEntry.java | 2 +- .../org/schabi/newpipe/util/ThemeHelper.java | 6 ++-- .../newpipe/views/AnimatedProgressBar.java | 2 +- .../schabi/newpipe/views/CollapsibleView.java | 6 ++-- .../giga/get/DownloadInitializer.java | 2 +- .../giga/get/DownloadRunnableFallback.java | 2 +- .../us/shandian/giga/get/FinishedMission.java | 2 +- .../java/us/shandian/giga/get/Mission.java | 2 +- .../giga/get/sqlite/FinishedMissionStore.java | 2 +- .../shandian/giga/io/CircularFileWriter.java | 2 +- .../java/us/shandian/giga/io/FileStream.java | 2 +- .../us/shandian/giga/io/FileStreamSAF.java | 2 +- .../us/shandian/giga/io/SharpInputStream.java | 2 +- .../giga/io/StoredDirectoryHelper.java | 8 ++--- .../us/shandian/giga/io/StoredFileHelper.java | 8 ++--- .../giga/postprocessing/Postprocessing.java | 2 +- .../giga/service/DownloadManager.java | 6 ++-- .../giga/service/DownloadManagerService.java | 11 +++---- .../giga/ui/adapter/MissionAdapter.java | 20 ++++++------ .../us/shandian/giga/ui/common/Deleter.java | 2 +- .../giga/ui/common/ProgressDrawable.java | 4 +-- .../giga/ui/common/ToolbarActivity.java | 4 +-- .../giga/ui/fragment/MissionsFragment.java | 10 +++--- .../java/us/shandian/giga/util/Utility.java | 10 +++--- .../activity_player_queue_control.xml | 10 +++--- .../activity_main_player.xml | 4 +-- .../fragment_video_detail.xml | 20 ++++++------ app/src/main/res/layout/activity_about.xml | 14 ++++---- app/src/main/res/layout/activity_main.xml | 4 +-- .../main/res/layout/activity_main_player.xml | 4 +-- .../layout/activity_player_queue_control.xml | 10 +++--- .../main/res/layout/activity_recaptcha.xml | 4 +-- app/src/main/res/layout/channel_header.xml | 2 +- .../res/layout/dialog_playback_parameter.xml | 4 +-- app/src/main/res/layout/dialog_playlists.xml | 2 +- app/src/main/res/layout/drawer_layout.xml | 6 ++-- app/src/main/res/layout/fragment_about.xml | 4 +-- .../main/res/layout/fragment_bookmarks.xml | 2 +- app/src/main/res/layout/fragment_channel.xml | 2 +- .../main/res/layout/fragment_choose_tabs.xml | 4 +-- app/src/main/res/layout/fragment_comments.xml | 2 +- app/src/main/res/layout/fragment_empty.xml | 4 +-- app/src/main/res/layout/fragment_feed.xml | 2 +- app/src/main/res/layout/fragment_kiosk.xml | 2 +- app/src/main/res/layout/fragment_licenses.xml | 4 +-- app/src/main/res/layout/fragment_main.xml | 4 +-- app/src/main/res/layout/fragment_playlist.xml | 2 +- .../res/layout/fragment_related_streams.xml | 2 +- app/src/main/res/layout/fragment_search.xml | 4 +-- .../main/res/layout/fragment_subscription.xml | 2 +- .../main/res/layout/fragment_video_detail.xml | 20 ++++++------ app/src/main/res/layout/list_choose_tabs.xml | 8 ++--- .../res/layout/list_choose_tabs_dialog.xml | 2 +- app/src/main/res/layout/missions.xml | 2 +- app/src/main/res/layout/player_popup.xml | 2 +- .../res/layout/player_popup_close_overlay.xml | 2 +- .../res/layout/select_channel_fragment.xml | 4 +-- .../main/res/layout/select_kiosk_fragment.xml | 4 +-- app/src/main/res/layout/toolbar_layout.xml | 4 +-- gradle.properties | 2 ++ 216 files changed, 643 insertions(+), 651 deletions(-) rename app/src/main/java/{android/support/design/widget => com/google/android/material/appbar}/FlingBehavior.java (94%) create mode 100644 gradle.properties diff --git a/.gitignore b/.gitignore index b1746282e..f4f47c5ee 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ /app/app.iml /.idea /*.iml -gradle.properties *~ .weblate *.class diff --git a/app/build.gradle b/app/build.gradle index 68498d5a4..f6df30078 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { versionCode 780 versionName "0.17.3" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } @@ -43,9 +43,9 @@ android { } ext { - supportLibVersion = '28.0.0' - exoPlayerLibVersion = '2.9.6' - roomDbLibVersion = '1.1.1' + androidxLibVersion = '1.0.0' + exoPlayerLibVersion = '2.9.6' //2.10.5 + roomDbLibVersion = '2.1.0' leakCanaryLibVersion = '1.5.4' //1.6.1 okHttpLibVersion = '3.12.1' icepickLibVersion = '3.2.0' @@ -53,7 +53,7 @@ ext { } dependencies { - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude module: 'support-annotations' }) @@ -61,13 +61,13 @@ dependencies { testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.23.0' - implementation "com.android.support:appcompat-v7:${supportLibVersion}" - implementation "com.android.support:support-v4:${supportLibVersion}" - implementation "com.android.support:design:${supportLibVersion}" - implementation "com.android.support:recyclerview-v7:${supportLibVersion}" - implementation "com.android.support:preference-v14:${supportLibVersion}" - implementation "com.android.support:cardview-v7:${supportLibVersion}" - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation "androidx.legacy:legacy-support-v4:${androidxLibVersion}" + implementation "com.google.android.material:material:${androidxLibVersion}" + implementation "androidx.recyclerview:recyclerview:${androidxLibVersion}" + implementation "androidx.legacy:legacy-preference-v14:${androidxLibVersion}" + implementation "androidx.cardview:cardview:${androidxLibVersion}" + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' // Originally in NewPipeExtractor implementation 'com.grack:nanojson:1.1' @@ -84,15 +84,15 @@ dependencies { debugImplementation "com.facebook.stetho:stetho:${stethoLibVersion}" debugImplementation "com.facebook.stetho:stetho-urlconnection:${stethoLibVersion}" - debugImplementation 'com.android.support:multidex:1.0.3' + debugImplementation 'androidx.multidex:multidex:2.0.1' implementation 'io.reactivex.rxjava2:rxjava:2.2.2' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1' - implementation "android.arch.persistence.room:runtime:${roomDbLibVersion}" - implementation "android.arch.persistence.room:rxjava2:${roomDbLibVersion}" - annotationProcessor "android.arch.persistence.room:compiler:${roomDbLibVersion}" + implementation "androidx.room:room-runtime:${roomDbLibVersion}" + implementation "androidx.room:room-rxjava2:${roomDbLibVersion}" + annotationProcessor "androidx.room:room-compiler:${roomDbLibVersion}" implementation "frankiesardo:icepick:${icepickLibVersion}" annotationProcessor "frankiesardo:icepick-processor:${icepickLibVersion}" diff --git a/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java b/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java index cdeb47483..6e51136c0 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java +++ b/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.report; import android.os.Parcel; -import android.support.test.filters.LargeTest; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.filters.LargeTest; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/debug/java/org/schabi/newpipe/DebugApp.java b/app/src/debug/java/org/schabi/newpipe/DebugApp.java index aff354a69..154fb5a8c 100644 --- a/app/src/debug/java/org/schabi/newpipe/DebugApp.java +++ b/app/src/debug/java/org/schabi/newpipe/DebugApp.java @@ -3,8 +3,8 @@ package org.schabi.newpipe; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.multidex.MultiDex; +import androidx.annotation.NonNull; +import androidx.multidex.MultiDex; import com.facebook.stetho.Stetho; import com.facebook.stetho.okhttp3.StethoInterceptor; diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 72049c99a..9052dabab 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,7 +29,7 @@ - + @@ -115,7 +115,7 @@ android:label="@string/reCaptchaActivity"/> diff --git a/app/src/main/java/android/support/design/widget/FlingBehavior.java b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java similarity index 94% rename from app/src/main/java/android/support/design/widget/FlingBehavior.java rename to app/src/main/java/com/google/android/material/appbar/FlingBehavior.java index 6e4754e11..4a2662f53 100644 --- a/app/src/main/java/android/support/design/widget/FlingBehavior.java +++ b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java @@ -1,11 +1,13 @@ -package android.support.design.widget; +package com.google.android.material.appbar; import android.content.Context; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.OverScroller; +import androidx.annotation.Nullable; +import androidx.coordinatorlayout.widget.CoordinatorLayout; + import java.lang.reflect.Field; // check this https://stackoverflow.com/questions/56849221/recyclerview-fling-causes-laggy-while-appbarlayout-is-scrolling/57997489#57997489 diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 3ac2d5014..bdf1e7837 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -6,8 +6,8 @@ import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; import android.os.Build; -import android.preference.PreferenceManager; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import android.util.Log; import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache; @@ -23,7 +23,6 @@ import org.acra.config.ConfigurationBuilder; import org.acra.sender.ReportSenderFactory; import org.schabi.newpipe.extractor.Downloader; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.utils.Localization; import org.schabi.newpipe.report.AcraReportSenderFactory; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; diff --git a/app/src/main/java/org/schabi/newpipe/BaseFragment.java b/app/src/main/java/org/schabi/newpipe/BaseFragment.java index 4e4cdcc0d..ccdb806ef 100644 --- a/app/src/main/java/org/schabi/newpipe/BaseFragment.java +++ b/app/src/main/java/org/schabi/newpipe/BaseFragment.java @@ -2,10 +2,10 @@ package org.schabi.newpipe; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import android.view.View; diff --git a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java index 87ffcb05d..22f7bc558 100644 --- a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java +++ b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java @@ -12,8 +12,8 @@ import android.net.ConnectivityManager; import android.net.Uri; import android.os.AsyncTask; import android.preference.PreferenceManager; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import android.util.Log; import org.json.JSONException; @@ -21,13 +21,9 @@ import org.json.JSONObject; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; -import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateEncodingException; @@ -38,7 +34,6 @@ import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import okhttp3.Request; -import okhttp3.RequestBody; import okhttp3.Response; /** diff --git a/app/src/main/java/org/schabi/newpipe/Downloader.java b/app/src/main/java/org/schabi/newpipe/Downloader.java index 11209a01e..ae76d5623 100644 --- a/app/src/main/java/org/schabi/newpipe/Downloader.java +++ b/app/src/main/java/org/schabi/newpipe/Downloader.java @@ -1,6 +1,6 @@ package org.schabi.newpipe; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import org.schabi.newpipe.extractor.DownloadRequest; @@ -10,7 +10,6 @@ import org.schabi.newpipe.extractor.utils.Localization; import java.io.IOException; import java.io.InputStream; -import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index b9b2e158a..98aadbaef 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -28,15 +28,15 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.design.widget.NavigationView; -import android.support.v4.app.Fragment; -import android.support.v4.view.GravityCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBar; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.NonNull; +import com.google.android.material.navigation.NavigationView; +import androidx.fragment.app.Fragment; +import androidx.core.view.GravityCompat; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Gravity; import android.view.Menu; diff --git a/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java b/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java index 189e5aeab..f3356d6e8 100644 --- a/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java +++ b/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java @@ -1,8 +1,8 @@ package org.schabi.newpipe; -import android.arch.persistence.room.Room; +import androidx.room.Room; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.database.AppDatabase; diff --git a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java index 55deeec5f..7f6af89c1 100644 --- a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java +++ b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java @@ -5,13 +5,12 @@ import android.content.Intent; import android.graphics.Bitmap; import android.os.Build; import android.os.Bundle; -import android.support.v4.app.NavUtils; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.core.app.NavUtils; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import android.webkit.CookieManager; -import android.webkit.ValueCallback; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index 89de0d0ef..1be6e096a 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -9,12 +9,12 @@ import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.NotificationCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; @@ -26,6 +26,8 @@ import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Toast; +import androidx.fragment.app.FragmentManager; + import org.schabi.newpipe.download.DownloadDialog; import org.schabi.newpipe.extractor.Info; import org.schabi.newpipe.extractor.NewPipe; @@ -433,7 +435,7 @@ public class RouterActivity extends AppCompatActivity { int selectedVideoStreamIndex = ListHelper.getDefaultResolutionIndex(this, sortedVideoStreams); - android.support.v4.app.FragmentManager fm = getSupportFragmentManager(); + FragmentManager fm = getSupportFragmentManager(); DownloadDialog downloadDialog = DownloadDialog.newInstance(result); downloadDialog.setVideoStreams(sortedVideoStreams); downloadDialog.setAudioStreams(result.getAudioStreams()); diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 6776b593b..2326e795e 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -4,13 +4,15 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -44,12 +46,12 @@ public class AboutActivity extends AppCompatActivity { }; /** - * The {@link android.support.v4.view.PagerAdapter} that will provide + * The {@link PagerAdapter} that will provide * fragments for each of the sections. We use a * {@link FragmentPagerAdapter} derivative, which will keep every * loaded fragment in memory. If this becomes too memory intensive, it * may be best to switch to a - * {@link android.support.v4.app.FragmentStatePagerAdapter}. + * {@link FragmentStatePagerAdapter}. */ private SectionsPagerAdapter mSectionsPagerAdapter; diff --git a/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java b/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java index 4f6a69dcc..fe78ff9f1 100644 --- a/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java +++ b/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java @@ -5,8 +5,8 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.*; import android.widget.TextView; import org.schabi.newpipe.R; diff --git a/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java b/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java index 09d33bd8a..eeafc1f57 100644 --- a/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java +++ b/app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java @@ -4,8 +4,8 @@ import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.os.AsyncTask; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; import android.webkit.WebView; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; diff --git a/app/src/main/java/org/schabi/newpipe/database/AppDatabase.java b/app/src/main/java/org/schabi/newpipe/database/AppDatabase.java index 145a77c70..d374f254b 100644 --- a/app/src/main/java/org/schabi/newpipe/database/AppDatabase.java +++ b/app/src/main/java/org/schabi/newpipe/database/AppDatabase.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.database; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.RoomDatabase; -import android.arch.persistence.room.TypeConverters; +import androidx.room.Database; +import androidx.room.RoomDatabase; +import androidx.room.TypeConverters; import org.schabi.newpipe.database.history.dao.SearchHistoryDAO; import org.schabi.newpipe.database.history.dao.StreamHistoryDAO; diff --git a/app/src/main/java/org/schabi/newpipe/database/BasicDAO.java b/app/src/main/java/org/schabi/newpipe/database/BasicDAO.java index 13117145a..b7381b9f1 100644 --- a/app/src/main/java/org/schabi/newpipe/database/BasicDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/BasicDAO.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Delete; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Update; +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Update; import java.util.Collection; import java.util.List; diff --git a/app/src/main/java/org/schabi/newpipe/database/Converters.java b/app/src/main/java/org/schabi/newpipe/database/Converters.java index d48fbfaf1..bb781d194 100644 --- a/app/src/main/java/org/schabi/newpipe/database/Converters.java +++ b/app/src/main/java/org/schabi/newpipe/database/Converters.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.database; -import android.arch.persistence.room.TypeConverter; +import androidx.room.TypeConverter; import org.schabi.newpipe.extractor.stream.StreamType; diff --git a/app/src/main/java/org/schabi/newpipe/database/Migrations.java b/app/src/main/java/org/schabi/newpipe/database/Migrations.java index 9d24dbb08..07d9749b2 100644 --- a/app/src/main/java/org/schabi/newpipe/database/Migrations.java +++ b/app/src/main/java/org/schabi/newpipe/database/Migrations.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.database; -import android.arch.persistence.db.SupportSQLiteDatabase; -import android.arch.persistence.room.migration.Migration; -import android.support.annotation.NonNull; +import androidx.sqlite.db.SupportSQLiteDatabase; +import androidx.room.migration.Migration; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.BuildConfig; diff --git a/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.java b/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.java index 83e629e48..df8094830 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.database.history.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Query; -import android.support.annotation.Nullable; +import androidx.room.Dao; +import androidx.room.Query; +import androidx.annotation.Nullable; import org.schabi.newpipe.database.history.model.SearchHistoryEntry; diff --git a/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.java b/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.java index 50d723f1f..2703b9783 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.database.history.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Query; -import android.support.annotation.Nullable; +import androidx.room.Dao; +import androidx.room.Query; +import androidx.annotation.Nullable; import org.schabi.newpipe.database.history.model.StreamHistoryEntry; import org.schabi.newpipe.database.stream.StreamStatisticsEntry; diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/SearchHistoryEntry.java b/app/src/main/java/org/schabi/newpipe/database/history/model/SearchHistoryEntry.java index dcfff99b8..222ef0a59 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/SearchHistoryEntry.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/SearchHistoryEntry.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.history.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; import java.util.Date; diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java index b553f437d..64bdf34de 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntity.java @@ -1,17 +1,17 @@ package org.schabi.newpipe.database.history.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.annotation.NonNull; import org.schabi.newpipe.database.stream.model.StreamEntity; import java.util.Date; -import static android.arch.persistence.room.ForeignKey.CASCADE; +import static androidx.room.ForeignKey.CASCADE; import static org.schabi.newpipe.database.history.model.StreamHistoryEntity.STREAM_HISTORY_TABLE; import static org.schabi.newpipe.database.history.model.StreamHistoryEntity.JOIN_STREAM_ID; import static org.schabi.newpipe.database.history.model.StreamHistoryEntity.STREAM_ACCESS_DATE; diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.java b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.java index 772b96cc4..ad66451e4 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.java +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.database.history.model; -import android.arch.persistence.room.ColumnInfo; +import androidx.room.ColumnInfo; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.extractor.stream.StreamType; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistMetadataEntry.java b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistMetadataEntry.java index 6d9fc2213..252ca07f0 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistMetadataEntry.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistMetadataEntry.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.database.playlist; -import android.arch.persistence.room.ColumnInfo; +import androidx.room.ColumnInfo; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_ID; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_NAME; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistStreamEntry.java b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistStreamEntry.java index b6ecfe1f0..fb45c3564 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistStreamEntry.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistStreamEntry.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.database.playlist; -import android.arch.persistence.room.ColumnInfo; +import androidx.room.ColumnInfo; import org.schabi.newpipe.database.LocalItem; import org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistDAO.java index 7a6282f96..f5a685a7c 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistDAO.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.database.playlist.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Query; +import androidx.room.Dao; +import androidx.room.Query; import org.schabi.newpipe.database.BasicDAO; import org.schabi.newpipe.database.playlist.model.PlaylistEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistRemoteDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistRemoteDAO.java index 82d767b07..b7ccf42f7 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistRemoteDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistRemoteDAO.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.database.playlist.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Transaction; +import androidx.room.Dao; +import androidx.room.Query; +import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index 8b6d62ca4..656fc27fc 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.database.playlist.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Transaction; +import androidx.room.Dao; +import androidx.room.Query; +import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistEntity.java index bfda8eeec..9d7989b21 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistEntity.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.database.playlist.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Index; +import androidx.room.PrimaryKey; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_NAME; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_TABLE; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index ab917a22b..bf446ca1f 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.playlist.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; import org.schabi.newpipe.database.playlist.PlaylistLocalItem; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistStreamEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistStreamEntity.java index a5b2e8248..87afdb4f9 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistStreamEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistStreamEntity.java @@ -1,13 +1,13 @@ package org.schabi.newpipe.database.playlist.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Index; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Index; import org.schabi.newpipe.database.stream.model.StreamEntity; -import static android.arch.persistence.room.ForeignKey.CASCADE; +import static androidx.room.ForeignKey.CASCADE; import static org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity.JOIN_INDEX; import static org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity.JOIN_PLAYLIST_ID; import static org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity.JOIN_STREAM_ID; diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.java b/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.java index 6909f3397..9b61eb469 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.java +++ b/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.database.stream; -import android.arch.persistence.room.ColumnInfo; +import androidx.room.ColumnInfo; import org.schabi.newpipe.database.LocalItem; import org.schabi.newpipe.database.history.model.StreamHistoryEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.java index 396a29fca..c89f6163f 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.stream.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Transaction; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; +import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; import org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamStateDAO.java b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamStateDAO.java index 1c06f4df9..c85810984 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamStateDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamStateDAO.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.stream.dao; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Transaction; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; +import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; import org.schabi.newpipe.database.stream.model.StreamStateEntity; diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.java b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.java index d6cab1090..1f26e214d 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.stream.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.StreamInfoItem; diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamStateEntity.java b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamStateEntity.java index d46d5cd74..8630bfa53 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamStateEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamStateEntity.java @@ -1,14 +1,14 @@ package org.schabi.newpipe.database.stream.model; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.support.annotation.Nullable; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.annotation.Nullable; import java.util.concurrent.TimeUnit; -import static android.arch.persistence.room.ForeignKey.CASCADE; +import static androidx.room.ForeignKey.CASCADE; import static org.schabi.newpipe.database.stream.model.StreamStateEntity.JOIN_STREAM_ID; import static org.schabi.newpipe.database.stream.model.StreamStateEntity.STREAM_STATE_TABLE; diff --git a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.java b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.java index ee6dea9fe..0869d60ff 100644 --- a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.database.subscription; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Transaction; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; +import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; diff --git a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionEntity.java b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionEntity.java index 9328fff6a..1e69567e1 100644 --- a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionEntity.java @@ -1,11 +1,11 @@ package org.schabi.newpipe.database.subscription; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index 2bc200f05..449a790e8 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -3,9 +3,9 @@ package org.schabi.newpipe.download; import android.app.FragmentTransaction; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 9f9dce259..1d536ea1a 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -11,15 +11,15 @@ import android.os.Bundle; import android.os.Environment; import android.os.IBinder; import android.preference.PreferenceManager; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.app.DialogFragment; -import android.support.v4.provider.DocumentFile; -import android.support.v7.app.AlertDialog; -import android.support.v7.view.menu.ActionMenuItemView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.fragment.app.DialogFragment; +import androidx.documentfile.provider.DocumentFile; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.menu.ActionMenuItemView; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.util.SparseArray; import android.view.LayoutInflater; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java index e2bf9fb73..8e328266e 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java @@ -1,10 +1,9 @@ package org.schabi.newpipe.fragments; import android.content.Intent; -import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.Log; import android.view.View; import android.widget.Button; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/BlankFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/BlankFragment.java index 948e9377d..1e284c711 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/BlankFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/BlankFragment.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.fragments; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/EmptyFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/EmptyFragment.java index 0666667d6..de9716f28 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/EmptyFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/EmptyFragment.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.fragments; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 7aeafb4a2..7a7710943 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -1,15 +1,15 @@ package org.schabi.newpipe.fragments; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/OnScrollBelowItemsListener.java b/app/src/main/java/org/schabi/newpipe/fragments/OnScrollBelowItemsListener.java index 774e6cc03..887097679 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/OnScrollBelowItemsListener.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/OnScrollBelowItemsListener.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.fragments; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.StaggeredGridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.StaggeredGridLayoutManager; /** * Recycler view scroll listener which calls the method {@link #onScrolledDown(RecyclerView)} diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdaptor.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdaptor.java index 8314f9539..d86226e92 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdaptor.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdaptor.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.fragments.detail; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; import android.view.ViewGroup; import java.util.ArrayList; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index d9d4e43bc..37d8851ea 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -9,17 +9,17 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewPager; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.core.content.ContextCompat; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; import android.text.Html; import android.text.Spanned; import android.text.TextUtils; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index 38a322285..d6fd1dd00 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -7,12 +7,12 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.GridLayoutManager; +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/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index 5d042c949..c9acf3c0b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.fragments.list; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.TextUtils; import android.util.Log; import android.view.View; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index dd7916314..95aef4764 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -4,10 +4,10 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBar; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java index 481639a7c..edaf0ec2b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java @@ -2,8 +2,8 @@ package org.schabi.newpipe.fragments.list.comments; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java index 36f9ff26c..6eaa2ea70 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.fragments.list.kiosk; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index b469be3b8..32b83bb22 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -3,10 +3,9 @@ package org.schabi.newpipe.fragments.list.playlist; import android.app.Activity; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index a3b01f251..f2e8aa244 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -6,13 +6,13 @@ import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.TooltipCompat; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.TooltipCompat; +import androidx.recyclerview.widget.ItemTouchHelper; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -73,7 +73,7 @@ import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; import io.reactivex.subjects.PublishSubject; -import static android.support.v7.widget.helper.ItemTouchHelper.Callback.makeMovementFlags; +import static androidx.recyclerview.widget.ItemTouchHelper.Callback.makeMovementFlags; import static java.util.Arrays.asList; import static org.schabi.newpipe.util.AnimationUtils.animateView; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java index 3f4e9af0b..d46f4bb31 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java @@ -2,8 +2,8 @@ package org.schabi.newpipe.fragments.list.search; import android.content.Context; import android.content.res.TypedArray; -import android.support.annotation.AttrRes; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.AttrRes; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedVideosFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedVideosFragment.java index 69a59c2f1..2186efda5 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedVideosFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedVideosFragment.java @@ -4,8 +4,8 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoItemBuilder.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoItemBuilder.java index e279ee21b..2a635bc74 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoItemBuilder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoItemBuilder.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.info_list; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoItemDialog.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoItemDialog.java index fd0e9f528..a7f961e7d 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoItemDialog.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoItemDialog.java @@ -3,8 +3,8 @@ package org.schabi.newpipe.info_list; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.View; import android.widget.TextView; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java index d8515e4ba..594ec81af 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.info_list; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index 4794ce3fd..f2bf5df39 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.info_list.holder; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.text.util.Linkify; import android.view.ViewGroup; import android.widget.TextView; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/InfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/InfoItemHolder.java index e06419126..1b97e2d27 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/InfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/InfoItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.info_list.holder; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/StreamMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/StreamMiniInfoItemHolder.java index 6c685c6cf..6173e53f9 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/StreamMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/StreamMiniInfoItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.info_list.holder; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java index abdf82353..414a9b6b5 100644 --- a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java @@ -5,11 +5,11 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.v4.app.Fragment; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.GridLayoutManager; +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/org/schabi/newpipe/local/HeaderFooterHolder.java b/app/src/main/java/org/schabi/newpipe/local/HeaderFooterHolder.java index 49a552b3e..9ee33b3c4 100644 --- a/app/src/main/java/org/schabi/newpipe/local/HeaderFooterHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/HeaderFooterHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.local; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; public class HeaderFooterHolder extends RecyclerView.ViewHolder { diff --git a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java index 4b1a1f363..89c1267c8 100644 --- a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.local; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index 99bd70f5b..8f67367aa 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -3,9 +3,9 @@ package org.schabi.newpipe.local.bookmark; import android.app.AlertDialog; import android.os.Bundle; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 656570943..ac02b0b37 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.local.dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java index ddbe65399..0507d3dd0 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java @@ -3,8 +3,8 @@ package org.schabi.newpipe.local.dialog; import android.app.AlertDialog; import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.View; import android.widget.EditText; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java index df98fb3eb..12e57808e 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java @@ -2,9 +2,9 @@ package org.schabi.newpipe.local.dialog; import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; import android.view.Window; import org.schabi.newpipe.database.stream.model.StreamEntity; diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.java b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.java index 475627c08..04406c3da 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.java @@ -2,9 +2,9 @@ package org.schabi.newpipe.local.feed; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -183,7 +183,7 @@ public class FeedFragment extends BaseListFragment, Voi } @Override - public void handleResult(@android.support.annotation.NonNull List result) { + public void handleResult(@androidx.annotation.NonNull List result) { super.handleResult(result); if (result.isEmpty()) { diff --git a/app/src/main/java/org/schabi/newpipe/local/history/HistoryEntryAdapter.java b/app/src/main/java/org/schabi/newpipe/local/history/HistoryEntryAdapter.java index 09549346b..c4ca08a0a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/HistoryEntryAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/HistoryEntryAdapter.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.local.history; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import org.schabi.newpipe.util.Localization; diff --git a/app/src/main/java/org/schabi/newpipe/local/history/HistoryListener.java b/app/src/main/java/org/schabi/newpipe/local/history/HistoryListener.java index 6e4b85713..fc039f770 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/HistoryListener.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/HistoryListener.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.local.history; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.StreamInfo; diff --git a/app/src/main/java/org/schabi/newpipe/local/history/HistoryRecordManager.java b/app/src/main/java/org/schabi/newpipe/local/history/HistoryRecordManager.java index 6714edcc5..d84fe0195 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/HistoryRecordManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/HistoryRecordManager.java @@ -21,7 +21,7 @@ package org.schabi.newpipe.local.history; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; @@ -51,7 +51,6 @@ import java.util.List; import io.reactivex.Completable; import io.reactivex.Flowable; import io.reactivex.Maybe; -import io.reactivex.Scheduler; import io.reactivex.Single; import io.reactivex.schedulers.Schedulers; diff --git a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java index 149dcfbdf..31ae70954 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java @@ -4,10 +4,10 @@ import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.snackbar.Snackbar; +import androidx.appcompat.app.AlertDialog; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -22,7 +22,6 @@ import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.schabi.newpipe.R; import org.schabi.newpipe.database.LocalItem; -import org.schabi.newpipe.database.playlist.PlaylistStreamEntry; import org.schabi.newpipe.database.stream.StreamStatisticsEntry; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.extractor.stream.StreamType; diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/LocalItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/LocalItemHolder.java index ed6a9b4cd..f9da969a5 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/LocalItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/LocalItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.local.holder; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistStreamItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistStreamItemHolder.java index c5d9a6428..30cc6de32 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistStreamItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistStreamItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.local.holder; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/LocalStatisticStreamItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/LocalStatisticStreamItemHolder.java index 05717392c..75fbf13ea 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/LocalStatisticStreamItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/LocalStatisticStreamItemHolder.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.local.holder; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index a8750ed47..9e72838ad 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -4,11 +4,11 @@ import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index 3ed1b864c..c025b360a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.local.playlist; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import org.schabi.newpipe.database.AppDatabase; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java index 6ff151dc1..fbcf5d70e 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java @@ -4,10 +4,10 @@ import android.app.AlertDialog; import android.app.Dialog; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportExportJsonHelper.java b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportExportJsonHelper.java index 6c8e8ea6c..ebfff9fe2 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportExportJsonHelper.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportExportJsonHelper.java @@ -19,7 +19,7 @@ package org.schabi.newpipe.local.subscription; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.grack.nanojson.JsonAppendableWriter; import com.grack.nanojson.JsonArray; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index a2727c29b..bff6c1b3a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -17,15 +17,15 @@ import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; import android.preference.PreferenceManager; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentManager; -import android.support.v4.content.LocalBroadcastManager; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java index 7e80264e6..7d6fa5158 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.local.subscription; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.MainActivity; @@ -93,7 +93,7 @@ public class SubscriptionService { * in the cooldown interval, only the latest changes are emitted to the subscribers. * This reduces the amount of observations caused by frequent updates to the database. */ - @android.support.annotation.NonNull + @androidx.annotation.NonNull public Flowable> getSubscription() { return subscription; } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionsImportFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionsImportFragment.java index ed694c70e..0a45e680a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionsImportFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionsImportFragment.java @@ -3,11 +3,11 @@ package org.schabi.newpipe.local.subscription; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.text.util.LinkifyCompat; -import android.support.v7.app.ActionBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.text.util.LinkifyCompat; +import androidx.appcompat.app.ActionBar; import android.text.TextUtils; import android.text.util.Linkify; import android.view.LayoutInflater; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/services/BaseImportExportService.java b/app/src/main/java/org/schabi/newpipe/local/subscription/services/BaseImportExportService.java index e3db6e12c..6b607cdca 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/services/BaseImportExportService.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/services/BaseImportExportService.java @@ -23,11 +23,11 @@ import android.app.Service; import android.content.Intent; import android.os.Build; import android.os.IBinder; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import android.text.TextUtils; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsExportService.java b/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsExportService.java index 35da7dd4f..31cd4b603 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsExportService.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsExportService.java @@ -20,7 +20,7 @@ package org.schabi.newpipe.local.subscription.services; import android.content.Intent; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.text.TextUtils; import android.util.Log; diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsImportService.java b/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsImportService.java index 48410205a..62c1dfeb9 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsImportService.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/services/SubscriptionsImportService.java @@ -20,9 +20,9 @@ package org.schabi.newpipe.local.subscription.services; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.LocalBroadcastManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.text.TextUtils; import android.util.Log; diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index c95488541..ab07ded22 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -28,9 +28,9 @@ import android.content.IntentFilter; import android.graphics.Bitmap; import android.os.Build; import android.os.IBinder; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.NotificationCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat; import android.util.Log; import android.view.View; import android.widget.RemoteViews; diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index e256070ca..71a8ae7b1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -28,8 +28,8 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.AudioManager; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import android.view.View; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 1491a66aa..7a3e60c66 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -33,14 +33,14 @@ import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.provider.Settings; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayerServiceBinder.java b/app/src/main/java/org/schabi/newpipe/player/PlayerServiceBinder.java index 80c27be7f..ef9d92aa0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayerServiceBinder.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayerServiceBinder.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player; import android.os.Binder; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; class PlayerServiceBinder extends Binder { private final BasePlayer basePlayer; diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayerState.java b/app/src/main/java/org/schabi/newpipe/player/PlayerState.java index 359159809..308e8100e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayerState.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayerState.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.schabi.newpipe.player.playqueue.PlayQueue; diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 3782d85c0..68446ed9f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -35,9 +35,9 @@ import android.graphics.PixelFormat; import android.os.Build; import android.os.IBinder; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.NotificationCompat; +import androidx.annotation.NonNull; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.core.app.NotificationCompat; import android.util.DisplayMetrics; import android.util.Log; import android.view.GestureDetector; diff --git a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java index bdd31f21b..2207808ac 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -6,11 +6,11 @@ import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.provider.Settings; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.ItemTouchHelper; import android.util.Log; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 7ce778e6a..360475ba2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -31,9 +31,9 @@ import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Build; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import android.util.Log; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/AudioReactor.java b/app/src/main/java/org/schabi/newpipe/player/helper/AudioReactor.java index 24d1ee1ca..8f344390a 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/AudioReactor.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/AudioReactor.java @@ -9,7 +9,7 @@ import android.media.AudioFocusRequest; import android.media.AudioManager; import android.media.audiofx.AudioEffect; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import com.google.android.exoplayer2.SimpleExoPlayer; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/CacheFactory.java b/app/src/main/java/org/schabi/newpipe/player/helper/CacheFactory.java index 091efc942..605228099 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/CacheFactory.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/CacheFactory.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.helper; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import com.google.android.exoplayer2.upstream.DataSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java index 63c0bf333..37d4c1df9 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java @@ -2,9 +2,9 @@ package org.schabi.newpipe.player.helper; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.media.session.MediaButtonReceiver; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.media.session.MediaButtonReceiver; import android.support.v4.media.session.MediaSessionCompat; import android.view.KeyEvent; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index f49ca3330..4feed74fe 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -3,10 +3,10 @@ package org.schabi.newpipe.player.helper; import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.View; import android.widget.CheckBox; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java index 5743891c2..4602e83b8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.helper; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.google.android.exoplayer2.source.ExtractorMediaSource; import com.google.android.exoplayer2.source.SingleSampleMediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index 7248857b5..5ca02980d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -4,9 +4,9 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.preference.PreferenceManager; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.accessibility.CaptioningManager; import com.google.android.exoplayer2.SeekParameters; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java b/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java index 3d1fd171f..72af2497f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java @@ -2,8 +2,8 @@ package org.schabi.newpipe.player.mediasession; import android.os.Bundle; import android.os.ResultReceiver; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.support.v4.media.session.MediaSessionCompat; import com.google.android.exoplayer2.Player; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java index cc9cd36bc..b99047417 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.mediasource; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import com.google.android.exoplayer2.source.BaseMediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java index d36a3e305..1519103c2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.player.mediasource; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.source.MediaPeriod; import com.google.android.exoplayer2.source.MediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSource.java index 8837e7529..b180ca9f2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSource.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.player.mediasource; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.google.android.exoplayer2.source.MediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java index fe29707fc..76f097665 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.mediasource; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.source.ConcatenatingMediaSource; import com.google.android.exoplayer2.source.ShuffleOrder; diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java index 377ca55a3..48179aed5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.mediasource; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.source.BaseMediaSource; import com.google.android.exoplayer2.source.MediaPeriod; diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java index 063d6b93e..fde826a96 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.player.playback; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.TextUtils; import android.util.Pair; diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java index fb1a609cc..85c852f57 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.player.playback; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.util.ArraySet; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.collection.ArraySet; import android.util.Log; import com.google.android.exoplayer2.source.MediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java b/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java index 4e79c6d75..9682ea15e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.playback; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.source.MediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java index 2a7c9f127..fcb1e2819 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.playqueue; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import org.reactivestreams.Subscriber; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java index eb2d678e0..b74736c49 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueAdapter.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.playqueue; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItem.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItem.java index bd0218454..309f22ad5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItem.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItem.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.playqueue; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.StreamInfoItem; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemHolder.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemHolder.java index effb9aae9..7ad34b91e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.player.playqueue; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java index 26be83b98..38e8e092a 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.playqueue; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleCallback { private static final int MINIMUM_INITIAL_DRAG_VELOCITY = 10; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java index 6bb556850..7e9199040 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.player.resolver; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.source.MediaSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java b/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java index bbe5d33ca..d8c0c89b7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.resolver; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java index 1da3ec211..ef28f71ee 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.player.resolver; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.google.android.exoplayer2.C; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java index 4bd795574..d6af20ae2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.player.resolver; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public interface Resolver { @Nullable Product resolve(@NonNull Source source); diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java index 7abebc49e..c503fe596 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java @@ -2,8 +2,8 @@ package org.schabi.newpipe.player.resolver; import android.content.Context; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.source.MediaSource; @@ -13,7 +13,6 @@ import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.stream.SubtitlesStream; import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.StreamInfo; -import org.schabi.newpipe.extractor.stream.SubtitlesStream; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.player.helper.PlayerDataSource; import org.schabi.newpipe.player.helper.PlayerHelper; diff --git a/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java index a6a81474f..d8506fe6e 100644 --- a/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java +++ b/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.report; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.acra.collector.CrashReportData; import org.acra.sender.ReportSender; diff --git a/app/src/main/java/org/schabi/newpipe/report/AcraReportSenderFactory.java b/app/src/main/java/org/schabi/newpipe/report/AcraReportSenderFactory.java index 89f0ec614..94b2e84a5 100644 --- a/app/src/main/java/org/schabi/newpipe/report/AcraReportSenderFactory.java +++ b/app/src/main/java/org/schabi/newpipe/report/AcraReportSenderFactory.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.report; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.acra.config.ACRAConfiguration; import org.acra.sender.ReportSender; diff --git a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java index f852e0134..e7a6319e3 100644 --- a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java @@ -12,13 +12,13 @@ import android.os.Handler; import android.os.Parcel; import android.os.Parcelable; import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.design.widget.Snackbar; -import android.support.v4.app.NavUtils; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.app.NavUtils; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java index 821636ee5..ce22b84e9 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java @@ -4,8 +4,8 @@ import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.provider.Settings; -import android.support.annotation.Nullable; -import android.support.v7.preference.Preference; +import androidx.annotation.Nullable; +import androidx.preference.Preference; import org.schabi.newpipe.R; import org.schabi.newpipe.util.Constants; diff --git a/app/src/main/java/org/schabi/newpipe/settings/BasePreferenceFragment.java b/app/src/main/java/org/schabi/newpipe/settings/BasePreferenceFragment.java index e4fae3e1f..056e9942a 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/BasePreferenceFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/BasePreferenceFragment.java @@ -3,10 +3,10 @@ package org.schabi.newpipe.settings; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.preference.PreferenceFragmentCompat; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.preference.PreferenceFragmentCompat; import android.view.View; import org.schabi.newpipe.MainActivity; diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index 25b443b1b..d05c23564 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -7,9 +7,9 @@ import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.preference.Preference; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.preference.Preference; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java index e161c8aa5..8becc79a8 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java @@ -8,9 +8,9 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v7.preference.Preference; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.preference.Preference; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/settings/HistorySettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/HistorySettingsFragment.java index 8ff86af05..cdfbf54a7 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/HistorySettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/HistorySettingsFragment.java @@ -1,9 +1,9 @@ package org.schabi.newpipe.settings; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.Preference; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.preference.Preference; import android.widget.Toast; import org.schabi.newpipe.R; diff --git a/app/src/main/java/org/schabi/newpipe/settings/MainSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/MainSettingsFragment.java index 43270926e..70460509d 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/MainSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/MainSettingsFragment.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.settings; import android.os.Bundle; -import android.support.v7.preference.Preference; +import androidx.preference.Preference; import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.CheckForNewAppVersionTask; diff --git a/app/src/main/java/org/schabi/newpipe/settings/NewPipeSettings.java b/app/src/main/java/org/schabi/newpipe/settings/NewPipeSettings.java index 44da38c35..e0003ccaa 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/NewPipeSettings.java +++ b/app/src/main/java/org/schabi/newpipe/settings/NewPipeSettings.java @@ -24,7 +24,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Environment; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.R; diff --git a/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java b/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java index 61bd4077e..7064aec33 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java @@ -3,10 +3,10 @@ package org.schabi.newpipe.settings; import android.app.Activity; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java b/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java index 780e6cd13..d97e4f1b7 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java @@ -3,10 +3,10 @@ package org.schabi.newpipe.settings; import android.app.Activity; import android.content.DialogInterface; import android.os.Bundle; -import android.support.v4.app.DialogFragment; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.fragment.app.DialogFragment; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index a8482e0eb..a3f218074 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -2,12 +2,12 @@ package org.schabi.newpipe.settings; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceFragmentCompat; -import android.support.v7.widget.Toolbar; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.preference.Preference; +import androidx.preference.PreferenceFragmentCompat; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/org/schabi/newpipe/settings/UpdateSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/UpdateSettingsFragment.java index 76d887dd1..9a4d59549 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/UpdateSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/UpdateSettingsFragment.java @@ -1,10 +1,9 @@ package org.schabi.newpipe.settings; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.preference.Preference; +import androidx.annotation.Nullable; +import androidx.preference.Preference; -import org.schabi.newpipe.CheckForNewAppVersionTask; import org.schabi.newpipe.R; public class UpdateSettingsFragment extends BasePreferenceFragment { diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java index 695f81ff5..b93ec91d0 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/AddTabDialog.java @@ -3,9 +3,9 @@ package org.schabi.newpipe.settings.tabs; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v7.widget.AppCompatImageView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.AppCompatImageView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java index 0e6b3e7a0..67295d8a5 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java @@ -4,18 +4,18 @@ import android.annotation.SuppressLint; import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.Fragment; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java index 3186c2cdf..64ba3683b 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java @@ -1,10 +1,10 @@ package org.schabi.newpipe.settings.tabs; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import com.grack.nanojson.JsonObject; import com.grack.nanojson.JsonSink; diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/TabsJsonHelper.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/TabsJsonHelper.java index b1c9974b7..9553e47e1 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/TabsJsonHelper.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/TabsJsonHelper.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.settings.tabs; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.grack.nanojson.JsonArray; import com.grack.nanojson.JsonObject; diff --git a/app/src/main/java/org/schabi/newpipe/streams/WebMWriter.java b/app/src/main/java/org/schabi/newpipe/streams/WebMWriter.java index 98261b0c9..e5881fd0b 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/WebMWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/WebMWriter.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.streams; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.streams.WebMReader.Cluster; import org.schabi.newpipe.streams.WebMReader.Segment; diff --git a/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java b/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java index 6a398a8a2..e47e14483 100644 --- a/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java @@ -24,10 +24,10 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.content.res.ColorStateList; -import android.support.annotation.ColorInt; -import android.support.annotation.FloatRange; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.animation.FastOutSlowInInterpolator; +import androidx.annotation.ColorInt; +import androidx.annotation.FloatRange; +import androidx.core.view.ViewCompat; +import androidx.interpolator.view.animation.FastOutSlowInInterpolator; import android.util.Log; import android.view.View; import android.widget.TextView; diff --git a/app/src/main/java/org/schabi/newpipe/util/FallbackViewHolder.java b/app/src/main/java/org/schabi/newpipe/util/FallbackViewHolder.java index f0cdfdf99..bfe0ae5c5 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FallbackViewHolder.java +++ b/app/src/main/java/org/schabi/newpipe/util/FallbackViewHolder.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.util; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; public class FallbackViewHolder extends RecyclerView.ViewHolder { diff --git a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java index d56913648..420322c27 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/FilePickerActivityHelper.java @@ -5,11 +5,11 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.Loader; -import android.support.v7.util.SortedList; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.loader.content.Loader; +import androidx.recyclerview.widget.SortedList; +import androidx.recyclerview.widget.RecyclerView; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/org/schabi/newpipe/util/InfoCache.java b/app/src/main/java/org/schabi/newpipe/util/InfoCache.java index 23b134281..afb7604c5 100644 --- a/app/src/main/java/org/schabi/newpipe/util/InfoCache.java +++ b/app/src/main/java/org/schabi/newpipe/util/InfoCache.java @@ -19,9 +19,9 @@ package org.schabi.newpipe.util; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.util.LruCache; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.collection.LruCache; import android.util.Log; import org.schabi.newpipe.MainActivity; diff --git a/app/src/main/java/org/schabi/newpipe/util/LayoutManagerSmoothScroller.java b/app/src/main/java/org/schabi/newpipe/util/LayoutManagerSmoothScroller.java index 9eca2d610..df7549c47 100644 --- a/app/src/main/java/org/schabi/newpipe/util/LayoutManagerSmoothScroller.java +++ b/app/src/main/java/org/schabi/newpipe/util/LayoutManagerSmoothScroller.java @@ -2,9 +2,9 @@ package org.schabi.newpipe.util; import android.content.Context; import android.graphics.PointF; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.LinearSmoothScroller; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.LinearSmoothScroller; +import androidx.recyclerview.widget.RecyclerView; public class LayoutManagerSmoothScroller extends LinearLayoutManager { diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index fa5530f12..eb950b1ed 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -4,7 +4,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.net.ConnectivityManager; import android.preference.PreferenceManager; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.MediaFormat; diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index eed1a8ae2..08c9c6d98 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -4,9 +4,9 @@ import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.PluralsRes; -import android.support.annotation.StringRes; +import androidx.annotation.NonNull; +import androidx.annotation.PluralsRes; +import androidx.annotation.StringRes; import android.text.TextUtils; import org.schabi.newpipe.R; diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java index 89c4b33fe..e2b03c8e8 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -8,12 +8,12 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/util/OnClickGesture.java b/app/src/main/java/org/schabi/newpipe/util/OnClickGesture.java index 01416b279..18f4f67f4 100644 --- a/app/src/main/java/org/schabi/newpipe/util/OnClickGesture.java +++ b/app/src/main/java/org/schabi/newpipe/util/OnClickGesture.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.util; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; public abstract class OnClickGesture { diff --git a/app/src/main/java/org/schabi/newpipe/util/PermissionHelper.java b/app/src/main/java/org/schabi/newpipe/util/PermissionHelper.java index 2fe5f95e4..f32bb6587 100644 --- a/app/src/main/java/org/schabi/newpipe/util/PermissionHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/PermissionHelper.java @@ -8,9 +8,9 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; -import android.support.annotation.RequiresApi; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.annotation.RequiresApi; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.view.Gravity; import android.widget.TextView; import android.widget.Toast; diff --git a/app/src/main/java/org/schabi/newpipe/util/SecondaryStreamHelper.java b/app/src/main/java/org/schabi/newpipe/util/SecondaryStreamHelper.java index 7febfa053..d2ebcd9f8 100644 --- a/app/src/main/java/org/schabi/newpipe/util/SecondaryStreamHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/SecondaryStreamHelper.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.util; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.stream.AudioStream; diff --git a/app/src/main/java/org/schabi/newpipe/util/SerializedCache.java b/app/src/main/java/org/schabi/newpipe/util/SerializedCache.java index 02871aff5..7680daf48 100644 --- a/app/src/main/java/org/schabi/newpipe/util/SerializedCache.java +++ b/app/src/main/java/org/schabi/newpipe/util/SerializedCache.java @@ -1,8 +1,8 @@ package org.schabi.newpipe.util; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.util.LruCache; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.collection.LruCache; import android.util.Log; import org.schabi.newpipe.MainActivity; diff --git a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java index c6ce3fec7..27e2f8422 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java @@ -2,8 +2,8 @@ package org.schabi.newpipe.util; import android.content.Context; import android.preference.PreferenceManager; -import android.support.annotation.DrawableRes; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.StringRes; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.NewPipe; diff --git a/app/src/main/java/org/schabi/newpipe/util/StateSaver.java b/app/src/main/java/org/schabi/newpipe/util/StateSaver.java index 3115862e0..fffa9e99f 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StateSaver.java +++ b/app/src/main/java/org/schabi/newpipe/util/StateSaver.java @@ -24,8 +24,8 @@ import android.content.Context; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index 4ccd66f0d..b3ec4d14e 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.util; import android.content.Context; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.stream.StreamInfoItem; diff --git a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java index 0c7861e16..661aa47c1 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java @@ -22,9 +22,9 @@ package org.schabi.newpipe.util; import android.content.Context; import android.content.res.TypedArray; import android.preference.PreferenceManager; -import android.support.annotation.AttrRes; -import android.support.annotation.StyleRes; -import android.support.v4.content.ContextCompat; +import androidx.annotation.AttrRes; +import androidx.annotation.StyleRes; +import androidx.core.content.ContextCompat; import android.util.TypedValue; import android.view.ContextThemeWrapper; diff --git a/app/src/main/java/org/schabi/newpipe/views/AnimatedProgressBar.java b/app/src/main/java/org/schabi/newpipe/views/AnimatedProgressBar.java index fe3e0d7bc..03ab40db5 100644 --- a/app/src/main/java/org/schabi/newpipe/views/AnimatedProgressBar.java +++ b/app/src/main/java/org/schabi/newpipe/views/AnimatedProgressBar.java @@ -1,7 +1,7 @@ package org.schabi.newpipe.views; import android.content.Context; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.AttributeSet; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.Animation; diff --git a/app/src/main/java/org/schabi/newpipe/views/CollapsibleView.java b/app/src/main/java/org/schabi/newpipe/views/CollapsibleView.java index 88d525625..38ca58cea 100644 --- a/app/src/main/java/org/schabi/newpipe/views/CollapsibleView.java +++ b/app/src/main/java/org/schabi/newpipe/views/CollapsibleView.java @@ -23,9 +23,9 @@ import android.animation.ValueAnimator; import android.content.Context; import android.os.Build; import android.os.Parcelable; -import android.support.annotation.IntDef; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; +import androidx.annotation.IntDef; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import android.util.Log; import android.widget.LinearLayout; diff --git a/app/src/main/java/us/shandian/giga/get/DownloadInitializer.java b/app/src/main/java/us/shandian/giga/get/DownloadInitializer.java index 901f2b54c..247faeb6d 100644 --- a/app/src/main/java/us/shandian/giga/get/DownloadInitializer.java +++ b/app/src/main/java/us/shandian/giga/get/DownloadInitializer.java @@ -1,6 +1,6 @@ package us.shandian.giga.get; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java b/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java index 3ed57778e..7fb1f0c77 100644 --- a/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java +++ b/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java @@ -1,6 +1,6 @@ package us.shandian.giga.get; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/get/FinishedMission.java b/app/src/main/java/us/shandian/giga/get/FinishedMission.java index 2a01896fe..b468f3c76 100644 --- a/app/src/main/java/us/shandian/giga/get/FinishedMission.java +++ b/app/src/main/java/us/shandian/giga/get/FinishedMission.java @@ -1,6 +1,6 @@ package us.shandian.giga.get; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class FinishedMission extends Mission { diff --git a/app/src/main/java/us/shandian/giga/get/Mission.java b/app/src/main/java/us/shandian/giga/get/Mission.java index a9ed08fc2..8e814a2af 100644 --- a/app/src/main/java/us/shandian/giga/get/Mission.java +++ b/app/src/main/java/us/shandian/giga/get/Mission.java @@ -1,6 +1,6 @@ package us.shandian.giga.get; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.Serializable; import java.util.Calendar; diff --git a/app/src/main/java/us/shandian/giga/get/sqlite/FinishedMissionStore.java b/app/src/main/java/us/shandian/giga/get/sqlite/FinishedMissionStore.java index 4650f75d0..1fa987c88 100644 --- a/app/src/main/java/us/shandian/giga/get/sqlite/FinishedMissionStore.java +++ b/app/src/main/java/us/shandian/giga/get/sqlite/FinishedMissionStore.java @@ -6,7 +6,7 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.io.File; diff --git a/app/src/main/java/us/shandian/giga/io/CircularFileWriter.java b/app/src/main/java/us/shandian/giga/io/CircularFileWriter.java index f9ceca6ad..e2afb9202 100644 --- a/app/src/main/java/us/shandian/giga/io/CircularFileWriter.java +++ b/app/src/main/java/us/shandian/giga/io/CircularFileWriter.java @@ -1,6 +1,6 @@ package us.shandian.giga.io; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/io/FileStream.java b/app/src/main/java/us/shandian/giga/io/FileStream.java index 5b2033324..2cc4d5db8 100644 --- a/app/src/main/java/us/shandian/giga/io/FileStream.java +++ b/app/src/main/java/us/shandian/giga/io/FileStream.java @@ -1,6 +1,6 @@ package us.shandian.giga.io; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java b/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java index ec6629268..fc716b4f9 100644 --- a/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java +++ b/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java @@ -3,7 +3,7 @@ package us.shandian.giga.io; import android.content.ContentResolver; import android.net.Uri; import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/io/SharpInputStream.java b/app/src/main/java/us/shandian/giga/io/SharpInputStream.java index 089101dfe..0d6320b53 100644 --- a/app/src/main/java/us/shandian/giga/io/SharpInputStream.java +++ b/app/src/main/java/us/shandian/giga/io/SharpInputStream.java @@ -5,7 +5,7 @@ */ package us.shandian.giga.io; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java b/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java index aeb810479..c1a63bb6a 100644 --- a/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java +++ b/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java @@ -8,9 +8,9 @@ import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.provider.DocumentFile; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.documentfile.provider.DocumentFile; import java.io.File; import java.io.IOException; @@ -244,7 +244,7 @@ public class StoredDirectoryHelper { * @param context The context * @param tree Directory where search * @param filename Target filename - * @return A {@link android.support.v4.provider.DocumentFile} contain the reference, otherwise, null + * @return A {@link DocumentFile} contain the reference, otherwise, null */ static DocumentFile findFileSAFHelper(@Nullable Context context, DocumentFile tree, String filename) { if (context == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { diff --git a/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java b/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java index 93394fb60..463c3ce5f 100644 --- a/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java +++ b/app/src/main/java/us/shandian/giga/io/StoredFileHelper.java @@ -7,10 +7,10 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.provider.DocumentFile; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.documentfile.provider.DocumentFile; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java b/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java index 15c4f575d..22cc325d5 100644 --- a/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java +++ b/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java @@ -1,7 +1,7 @@ package us.shandian.giga.postprocessing; import android.os.Message; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import org.schabi.newpipe.streams.io.SharpStream; diff --git a/app/src/main/java/us/shandian/giga/service/DownloadManager.java b/app/src/main/java/us/shandian/giga/service/DownloadManager.java index d4f60abcd..3d34411b9 100644 --- a/app/src/main/java/us/shandian/giga/service/DownloadManager.java +++ b/app/src/main/java/us/shandian/giga/service/DownloadManager.java @@ -2,9 +2,9 @@ package us.shandian.giga.service; import android.content.Context; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.util.DiffUtil; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.DiffUtil; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java b/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java index 4463c6825..461787b62 100755 --- a/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java +++ b/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java @@ -22,14 +22,13 @@ import android.os.Build; import android.os.Handler; import android.os.Handler.Callback; import android.os.IBinder; -import android.os.Looper; import android.os.Message; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.Builder; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationCompat.Builder; import android.util.Log; import android.util.SparseArray; import android.widget.Toast; diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index 62d209ee1..6d1169031 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -10,16 +10,16 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Handler; import android.os.Message; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.content.FileProvider; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.Adapter; -import android.support.v7.widget.RecyclerView.ViewHolder; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.core.content.FileProvider; +import androidx.core.view.ViewCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.Adapter; +import androidx.recyclerview.widget.RecyclerView.ViewHolder; import android.util.Log; import android.util.SparseArray; import android.view.HapticFeedbackConstants; diff --git a/app/src/main/java/us/shandian/giga/ui/common/Deleter.java b/app/src/main/java/us/shandian/giga/ui/common/Deleter.java index 573bead94..81b4e33e8 100644 --- a/app/src/main/java/us/shandian/giga/ui/common/Deleter.java +++ b/app/src/main/java/us/shandian/giga/ui/common/Deleter.java @@ -4,7 +4,7 @@ import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.os.Handler; -import android.support.design.widget.Snackbar; +import com.google.android.material.snackbar.Snackbar; import android.view.View; import org.schabi.newpipe.R; diff --git a/app/src/main/java/us/shandian/giga/ui/common/ProgressDrawable.java b/app/src/main/java/us/shandian/giga/ui/common/ProgressDrawable.java index 33eba22eb..a0ff24aaa 100644 --- a/app/src/main/java/us/shandian/giga/ui/common/ProgressDrawable.java +++ b/app/src/main/java/us/shandian/giga/ui/common/ProgressDrawable.java @@ -9,8 +9,8 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Looper; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; public class ProgressDrawable extends Drawable { private static final int MARQUEE_INTERVAL = 150; diff --git a/app/src/main/java/us/shandian/giga/ui/common/ToolbarActivity.java b/app/src/main/java/us/shandian/giga/ui/common/ToolbarActivity.java index 6a04db5cd..2ba091573 100644 --- a/app/src/main/java/us/shandian/giga/ui/common/ToolbarActivity.java +++ b/app/src/main/java/us/shandian/giga/ui/common/ToolbarActivity.java @@ -1,8 +1,8 @@ package us.shandian.giga.ui.common; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import org.schabi.newpipe.R; diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 0ce245828..26da47b1f 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -12,11 +12,11 @@ import android.os.Bundle; import android.os.Environment; import android.os.IBinder; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/us/shandian/giga/util/Utility.java b/app/src/main/java/us/shandian/giga/util/Utility.java index dc6a67b4b..21fdd72ad 100644 --- a/app/src/main/java/us/shandian/giga/util/Utility.java +++ b/app/src/main/java/us/shandian/giga/util/Utility.java @@ -4,11 +4,11 @@ import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/res/layout-land/activity_player_queue_control.xml b/app/src/main/res/layout-land/activity_player_queue_control.xml index 72f673ffc..7467a79cf 100644 --- a/app/src/main/res/layout-land/activity_player_queue_control.xml +++ b/app/src/main/res/layout-land/activity_player_queue_control.xml @@ -8,14 +8,14 @@ android:fitsSystemWindows="true" tools:context="org.schabi.newpipe.player.BackgroundPlayerActivity"> - - - + - - - - - - + app:layout_behavior="com.google.android.material.appbar.FlingBehavior"> - @@ -146,7 +146,7 @@ - + - + - - - + - + - - - - - + - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index b70d73250..92e73234f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/main/res/layout/activity_main_player.xml b/app/src/main/res/layout/activity_main_player.xml index a55a5df05..f2b204b75 100644 --- a/app/src/main/res/layout/activity_main_player.xml +++ b/app/src/main/res/layout/activity_main_player.xml @@ -112,7 +112,7 @@ - - - - - + - - - - + - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index e8537cad3..d510bf26d 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,4 +1,4 @@ - - + diff --git a/app/src/main/res/layout/fragment_bookmarks.xml b/app/src/main/res/layout/fragment_bookmarks.xml index 56e13225f..fd2729f12 100644 --- a/app/src/main/res/layout/fragment_bookmarks.xml +++ b/app/src/main/res/layout/fragment_bookmarks.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - - @@ -17,7 +17,7 @@ android:layout_marginTop="90dp" tools:visibility="visible"/> - + - - - @@ -54,4 +54,4 @@ android:layout_height="wrap_content" android:orientation="vertical" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index abbe69ff7..85614342d 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent"> - - - - - - - - - + app:layout_behavior="com.google.android.material.appbar.FlingBehavior"> - @@ -142,7 +142,7 @@ - + - + - - - + - + diff --git a/app/src/main/res/layout/list_choose_tabs.xml b/app/src/main/res/layout/list_choose_tabs.xml index e62cf24f1..ce17e0382 100644 --- a/app/src/main/res/layout/list_choose_tabs.xml +++ b/app/src/main/res/layout/list_choose_tabs.xml @@ -1,5 +1,5 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/list_choose_tabs_dialog.xml b/app/src/main/res/layout/list_choose_tabs_dialog.xml index 8c6574e6d..1798c16a0 100644 --- a/app/src/main/res/layout/list_choose_tabs_dialog.xml +++ b/app/src/main/res/layout/list_choose_tabs_dialog.xml @@ -7,7 +7,7 @@ android:minHeight="?listPreferredItemHeightSmall" android:orientation="horizontal"> - - diff --git a/app/src/main/res/layout/player_popup.xml b/app/src/main/res/layout/player_popup.xml index 7a92c6712..9fbc22145 100644 --- a/app/src/main/res/layout/player_popup.xml +++ b/app/src/main/res/layout/player_popup.xml @@ -181,7 +181,7 @@ tools:ignore="HardcodedText,RtlHardcoded,RtlSymmetry" tools:text="1:06:29"/> - - - - + - - + \ No newline at end of file diff --git a/app/src/main/res/layout/toolbar_layout.xml b/app/src/main/res/layout/toolbar_layout.xml index 096974c03..5d224bda8 100644 --- a/app/src/main/res/layout/toolbar_layout.xml +++ b/app/src/main/res/layout/toolbar_layout.xml @@ -8,7 +8,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..5465fec0e --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file