diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index c927a910f..7abf6a652 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -43,15 +43,15 @@ import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlaylistPlayQueue; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; import org.schabi.newpipe.report.UserAction; +import org.schabi.newpipe.util.AndroidTvUtils; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.ExtractorHelper; -import org.schabi.newpipe.util.AndroidTvUtils; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; import org.schabi.newpipe.util.ThemeHelper; -import org.schabi.newpipe.views.FocusOverlayView; import org.schabi.newpipe.util.urlfinder.UrlFinder; +import org.schabi.newpipe.views.FocusOverlayView; import java.io.Serializable; import java.util.ArrayList; diff --git a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt index cba834942..c104c83f7 100644 --- a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt @@ -1,12 +1,17 @@ package org.schabi.newpipe.database.feed.dao -import androidx.room.* +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Transaction +import androidx.room.Update import io.reactivex.Flowable import org.schabi.newpipe.database.feed.model.FeedEntity import org.schabi.newpipe.database.feed.model.FeedLastUpdatedEntity import org.schabi.newpipe.database.stream.model.StreamEntity import org.schabi.newpipe.database.subscription.SubscriptionEntity -import java.util.* +import java.util.Date @Dao abstract class FeedDAO { diff --git a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedGroupDAO.kt b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedGroupDAO.kt index d2616f7d6..c8700dea2 100644 --- a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedGroupDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedGroupDAO.kt @@ -1,6 +1,11 @@ package org.schabi.newpipe.database.feed.dao -import androidx.room.* +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Transaction +import androidx.room.Update import io.reactivex.Flowable import io.reactivex.Maybe import org.schabi.newpipe.database.feed.model.FeedGroupEntity diff --git a/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedLastUpdatedEntity.kt b/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedLastUpdatedEntity.kt index d6d7e7dec..0ac2e2bf1 100644 --- a/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedLastUpdatedEntity.kt +++ b/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedLastUpdatedEntity.kt @@ -7,7 +7,7 @@ import androidx.room.PrimaryKey import org.schabi.newpipe.database.feed.model.FeedLastUpdatedEntity.Companion.FEED_LAST_UPDATED_TABLE import org.schabi.newpipe.database.feed.model.FeedLastUpdatedEntity.Companion.SUBSCRIPTION_ID import org.schabi.newpipe.database.subscription.SubscriptionEntity -import java.util.* +import java.util.Date @Entity( tableName = FEED_LAST_UPDATED_TABLE, @@ -34,4 +34,4 @@ data class FeedLastUpdatedEntity( const val SUBSCRIPTION_ID = "subscription_id" const val LAST_UPDATED = "last_updated" } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.kt b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.kt index e06ecee36..970550a94 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.kt +++ b/app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.kt @@ -3,7 +3,7 @@ package org.schabi.newpipe.database.history.model import androidx.room.ColumnInfo import androidx.room.Embedded import org.schabi.newpipe.database.stream.model.StreamEntity -import java.util.* +import java.util.Date data class StreamHistoryEntry( @Embedded diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.kt b/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.kt index 70081f8ed..e6a15baee 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.kt +++ b/app/src/main/java/org/schabi/newpipe/database/stream/StreamStatisticsEntry.kt @@ -6,7 +6,7 @@ import org.schabi.newpipe.database.LocalItem import org.schabi.newpipe.database.history.model.StreamHistoryEntity import org.schabi.newpipe.database.stream.model.StreamEntity import org.schabi.newpipe.extractor.stream.StreamInfoItem -import java.util.* +import java.util.Date class StreamStatisticsEntry( @Embedded diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.kt b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.kt index 517f3cf0b..6d8425d2a 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/stream/dao/StreamDAO.kt @@ -1,6 +1,11 @@ package org.schabi.newpipe.database.stream.dao -import androidx.room.* +import androidx.room.ColumnInfo +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Transaction import io.reactivex.Flowable import org.schabi.newpipe.database.BasicDAO import org.schabi.newpipe.database.stream.model.StreamEntity @@ -8,8 +13,7 @@ import org.schabi.newpipe.database.stream.model.StreamEntity.Companion.STREAM_ID import org.schabi.newpipe.extractor.stream.StreamType import org.schabi.newpipe.extractor.stream.StreamType.AUDIO_LIVE_STREAM import org.schabi.newpipe.extractor.stream.StreamType.LIVE_STREAM -import java.util.* -import kotlin.collections.ArrayList +import java.util.Date @Dao abstract class StreamDAO : BasicDAO { diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.kt b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.kt index 5ec2999f4..5d91091ff 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.kt +++ b/app/src/main/java/org/schabi/newpipe/database/stream/model/StreamEntity.kt @@ -1,6 +1,10 @@ package org.schabi.newpipe.database.stream.model -import androidx.room.* +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.stream.model.StreamEntity.Companion.STREAM_SERVICE_ID import org.schabi.newpipe.database.stream.model.StreamEntity.Companion.STREAM_TABLE import org.schabi.newpipe.database.stream.model.StreamEntity.Companion.STREAM_URL @@ -10,7 +14,8 @@ import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.extractor.stream.StreamType import org.schabi.newpipe.player.playqueue.PlayQueueItem import java.io.Serializable -import java.util.* +import java.util.Calendar +import java.util.Date @Entity(tableName = STREAM_TABLE, indices = [ diff --git a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.kt b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.kt index 0269b5b17..573fa4b90 100644 --- a/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/subscription/SubscriptionDAO.kt @@ -1,6 +1,10 @@ package org.schabi.newpipe.database.subscription -import androidx.room.* +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import androidx.room.Transaction import io.reactivex.Flowable import io.reactivex.Maybe import org.schabi.newpipe.database.BasicDAO 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 ffce053b0..5e36d81a2 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 @@ -41,12 +41,12 @@ import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.search.SearchExtractor; import org.schabi.newpipe.extractor.search.SearchInfo; -import org.schabi.newpipe.util.AndroidTvUtils; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.list.BaseListFragment; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; +import org.schabi.newpipe.util.AndroidTvUtils; import org.schabi.newpipe.util.AnimationUtils; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.ExtractorHelper; diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedDatabaseManager.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedDatabaseManager.kt index 5231e16c6..0bb4c5e0f 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedDatabaseManager.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedDatabaseManager.kt @@ -16,8 +16,8 @@ import org.schabi.newpipe.database.stream.model.StreamEntity import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.extractor.stream.StreamType import org.schabi.newpipe.local.subscription.FeedGroupIcon -import java.util.* -import kotlin.collections.ArrayList +import java.util.Calendar +import java.util.Date class FeedDatabaseManager(context: Context) { private val database = NewPipeDatabase.getInstance(context) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index e7ff8b86a..4f558e54a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -22,14 +22,27 @@ package org.schabi.newpipe.local.feed import android.content.Intent import android.os.Bundle import android.os.Parcelable -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders import androidx.preference.PreferenceManager import icepick.State -import kotlinx.android.synthetic.main.error_retry.* -import kotlinx.android.synthetic.main.fragment_feed.* +import kotlinx.android.synthetic.main.error_retry.error_button_retry +import kotlinx.android.synthetic.main.error_retry.error_message_view +import kotlinx.android.synthetic.main.fragment_feed.empty_state_view +import kotlinx.android.synthetic.main.fragment_feed.error_panel +import kotlinx.android.synthetic.main.fragment_feed.items_list +import kotlinx.android.synthetic.main.fragment_feed.loading_progress_bar +import kotlinx.android.synthetic.main.fragment_feed.loading_progress_text +import kotlinx.android.synthetic.main.fragment_feed.refresh_root_view +import kotlinx.android.synthetic.main.fragment_feed.refresh_subtitle_text +import kotlinx.android.synthetic.main.fragment_feed.refresh_text import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.fragments.list.BaseListFragment @@ -37,7 +50,7 @@ import org.schabi.newpipe.local.feed.service.FeedLoadService import org.schabi.newpipe.report.UserAction import org.schabi.newpipe.util.AnimationUtils.animateView import org.schabi.newpipe.util.Localization -import java.util.* +import java.util.Calendar class FeedFragment : BaseListFragment() { private lateinit var viewModel: FeedViewModel diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedState.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedState.kt index c37d6a0b3..fd6a0f6fd 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedState.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedState.kt @@ -2,7 +2,7 @@ package org.schabi.newpipe.local.feed import androidx.annotation.StringRes import org.schabi.newpipe.extractor.stream.StreamInfoItem -import java.util.* +import java.util.Calendar sealed class FeedState { data class ProgressState( @@ -21,4 +21,4 @@ sealed class FeedState { data class ErrorState( val error: Throwable? = null ) : FeedState() -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt index adc262ecb..796eeae91 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt @@ -12,9 +12,13 @@ import io.reactivex.schedulers.Schedulers import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.local.feed.service.FeedEventManager -import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.* +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.ErrorResultEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.IdleEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.ProgressEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.SuccessResultEvent import org.schabi.newpipe.util.DEFAULT_THROTTLE_TIMEOUT -import java.util.* +import java.util.Calendar +import java.util.Date import java.util.concurrent.TimeUnit class FeedViewModel(applicationContext: Context, val groupId: Long = FeedGroupEntity.GROUP_ALL_ID) : ViewModel() { @@ -68,4 +72,4 @@ class FeedViewModel(applicationContext: Context, val groupId: Long = FeedGroupEn } private data class CombineResultHolder(val t1: FeedEventManager.Event, val t2: List, val t3: Long, val t4: Date?) -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt b/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt index 8b33add32..1e51120a5 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt @@ -49,17 +49,19 @@ import org.schabi.newpipe.extractor.ListInfo import org.schabi.newpipe.extractor.exceptions.ReCaptchaException import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.local.feed.FeedDatabaseManager -import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.* +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.ErrorResultEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.IdleEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.ProgressEvent +import org.schabi.newpipe.local.feed.service.FeedEventManager.Event.SuccessResultEvent import org.schabi.newpipe.local.feed.service.FeedEventManager.postEvent import org.schabi.newpipe.local.subscription.SubscriptionManager import org.schabi.newpipe.util.ExceptionUtils import org.schabi.newpipe.util.ExtractorHelper import java.io.IOException -import java.util.* +import java.util.Calendar import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger -import kotlin.collections.ArrayList class FeedLoadService : Service() { companion object { @@ -463,4 +465,4 @@ class FeedLoadService : Service() { itemsErrors = itemsErrorsHolder.toList() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index eae406ed2..894b67024 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -2,13 +2,21 @@ package org.schabi.newpipe.local.subscription import android.app.Activity import android.app.AlertDialog -import android.content.* +import android.content.BroadcastReceiver +import android.content.Context +import android.content.DialogInterface +import android.content.Intent +import android.content.IntentFilter import android.content.res.Configuration import android.os.Bundle import android.os.Environment import android.os.Parcelable import android.preference.PreferenceManager -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.View +import android.view.ViewGroup import android.widget.Toast import androidx.lifecycle.ViewModelProviders import androidx.localbroadcastmanager.content.LocalBroadcastManager @@ -21,8 +29,9 @@ import com.xwray.groupie.Section import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import icepick.State import io.reactivex.disposables.CompositeDisposable -import kotlinx.android.synthetic.main.dialog_title.view.* -import kotlinx.android.synthetic.main.fragment_subscription.* +import kotlinx.android.synthetic.main.dialog_title.view.itemAdditionalDetails +import kotlinx.android.synthetic.main.dialog_title.view.itemTitleView +import kotlinx.android.synthetic.main.fragment_subscription.items_list import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.extractor.channel.ChannelInfoItem @@ -30,19 +39,33 @@ import org.schabi.newpipe.fragments.BaseStateFragment import org.schabi.newpipe.local.subscription.SubscriptionViewModel.SubscriptionState import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog import org.schabi.newpipe.local.subscription.dialog.FeedGroupReorderDialog -import org.schabi.newpipe.local.subscription.item.* +import org.schabi.newpipe.local.subscription.item.ChannelItem +import org.schabi.newpipe.local.subscription.item.EmptyPlaceholderItem +import org.schabi.newpipe.local.subscription.item.FeedGroupAddItem +import org.schabi.newpipe.local.subscription.item.FeedGroupCardItem +import org.schabi.newpipe.local.subscription.item.FeedGroupCarouselItem +import org.schabi.newpipe.local.subscription.item.FeedImportExportItem +import org.schabi.newpipe.local.subscription.item.HeaderWithMenuItem import org.schabi.newpipe.local.subscription.item.HeaderWithMenuItem.Companion.PAYLOAD_UPDATE_VISIBILITY_MENU_ITEM import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService.EXPORT_COMPLETE_ACTION import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService.KEY_FILE_PATH import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService -import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.* +import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.IMPORT_COMPLETE_ACTION +import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE +import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_VALUE +import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.PREVIOUS_EXPORT_MODE import org.schabi.newpipe.report.UserAction -import org.schabi.newpipe.util.* import org.schabi.newpipe.util.AnimationUtils.animateView +import org.schabi.newpipe.util.FilePickerActivityHelper +import org.schabi.newpipe.util.NavigationHelper +import org.schabi.newpipe.util.OnClickGesture +import org.schabi.newpipe.util.ShareUtils +import org.schabi.newpipe.util.ThemeHelper import java.io.File import java.text.SimpleDateFormat -import java.util.* +import java.util.Date +import java.util.Locale import kotlin.math.floor import kotlin.math.max diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt index 8fd0b0e31..421bd0de4 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt @@ -22,12 +22,29 @@ import com.xwray.groupie.Section import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import icepick.Icepick import icepick.State -import kotlinx.android.synthetic.main.dialog_feed_group_create.* +import kotlinx.android.synthetic.main.dialog_feed_group_create.cancel_button +import kotlinx.android.synthetic.main.dialog_feed_group_create.confirm_button +import kotlinx.android.synthetic.main.dialog_feed_group_create.delete_button +import kotlinx.android.synthetic.main.dialog_feed_group_create.delete_screen_message +import kotlinx.android.synthetic.main.dialog_feed_group_create.group_name_input +import kotlinx.android.synthetic.main.dialog_feed_group_create.group_name_input_container +import kotlinx.android.synthetic.main.dialog_feed_group_create.icon_preview +import kotlinx.android.synthetic.main.dialog_feed_group_create.icon_selector +import kotlinx.android.synthetic.main.dialog_feed_group_create.options_root +import kotlinx.android.synthetic.main.dialog_feed_group_create.select_channel_button +import kotlinx.android.synthetic.main.dialog_feed_group_create.selected_subscription_count_view +import kotlinx.android.synthetic.main.dialog_feed_group_create.separator +import kotlinx.android.synthetic.main.dialog_feed_group_create.subscriptions_selector +import kotlinx.android.synthetic.main.dialog_feed_group_create.subscriptions_selector_header_info +import kotlinx.android.synthetic.main.dialog_feed_group_create.subscriptions_selector_list import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.database.subscription.SubscriptionEntity import org.schabi.newpipe.local.subscription.FeedGroupIcon -import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.* +import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.DeleteScreen +import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.IconPickerScreen +import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.InitialScreen +import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.SubscriptionsPickerScreen import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialogViewModel.DialogEvent.ProcessingEvent import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialogViewModel.DialogEvent.SuccessEvent import org.schabi.newpipe.local.subscription.item.EmptyPlaceholderItem @@ -363,4 +380,4 @@ class FeedGroupDialog : DialogFragment() { return dialog } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupReorderDialog.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupReorderDialog.kt index 090a59f13..6578854ce 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupReorderDialog.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupReorderDialog.kt @@ -16,15 +16,15 @@ import com.xwray.groupie.TouchCallback import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import icepick.Icepick import icepick.State -import kotlinx.android.synthetic.main.dialog_feed_group_reorder.* +import kotlinx.android.synthetic.main.dialog_feed_group_reorder.confirm_button +import kotlinx.android.synthetic.main.dialog_feed_group_reorder.feed_groups_list import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.local.subscription.dialog.FeedGroupReorderDialogViewModel.DialogEvent.ProcessingEvent import org.schabi.newpipe.local.subscription.dialog.FeedGroupReorderDialogViewModel.DialogEvent.SuccessEvent import org.schabi.newpipe.local.subscription.item.FeedGroupReorderItem import org.schabi.newpipe.util.ThemeHelper -import java.util.* -import kotlin.collections.ArrayList +import java.util.Collections class FeedGroupReorderDialog : DialogFragment() { private lateinit var viewModel: FeedGroupReorderDialogViewModel @@ -109,4 +109,4 @@ class FeedGroupReorderDialog : DialogFragment() { override fun onSwiped(viewHolder: RecyclerView.ViewHolder, swipeDir: Int) {} } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/ChannelItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/ChannelItem.kt index d1988dc29..a6b958d4b 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/ChannelItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/ChannelItem.kt @@ -4,7 +4,10 @@ import android.content.Context import com.nostra13.universalimageloader.core.ImageLoader import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.list_channel_item.* +import kotlinx.android.synthetic.main.list_channel_item.itemAdditionalDetails +import kotlinx.android.synthetic.main.list_channel_item.itemChannelDescriptionView +import kotlinx.android.synthetic.main.list_channel_item.itemThumbnailView +import kotlinx.android.synthetic.main.list_channel_item.itemTitleView import org.schabi.newpipe.R import org.schabi.newpipe.extractor.channel.ChannelInfoItem import org.schabi.newpipe.util.ImageDisplayConstants @@ -62,4 +65,4 @@ class ChannelItem( override fun getSpanSize(spanCount: Int, position: Int): Int { return if (itemVersion == ItemVersion.GRID) 1 else spanCount } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt index e6f0e0807..0e4ab8d18 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCardItem.kt @@ -2,7 +2,8 @@ package org.schabi.newpipe.local.subscription.item import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.feed_group_card_item.* +import kotlinx.android.synthetic.main.feed_group_card_item.icon +import kotlinx.android.synthetic.main.feed_group_card_item.title import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.local.subscription.FeedGroupIcon @@ -27,4 +28,4 @@ data class FeedGroupCardItem( viewHolder.title.text = name viewHolder.icon.setImageResource(icon.getDrawableRes(viewHolder.containerView.context)) } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCarouselItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCarouselItem.kt index ae93d149d..dfffce59c 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCarouselItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupCarouselItem.kt @@ -8,7 +8,7 @@ import androidx.recyclerview.widget.RecyclerView import com.xwray.groupie.GroupAdapter import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.feed_item_carousel.* +import kotlinx.android.synthetic.main.feed_item_carousel.recycler_view import org.schabi.newpipe.R import org.schabi.newpipe.local.subscription.decoration.FeedGroupCarouselDecoration @@ -54,4 +54,4 @@ class FeedGroupCarouselItem(context: Context, private val carouselAdapter: Group listState = linearLayoutManager?.onSaveInstanceState() } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt index cf010af7f..fb1e93cb8 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedGroupReorderItem.kt @@ -6,7 +6,9 @@ import androidx.recyclerview.widget.ItemTouchHelper.DOWN import androidx.recyclerview.widget.ItemTouchHelper.UP import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.feed_group_reorder_item.* +import kotlinx.android.synthetic.main.feed_group_reorder_item.group_icon +import kotlinx.android.synthetic.main.feed_group_reorder_item.group_name +import kotlinx.android.synthetic.main.feed_group_reorder_item.handle import org.schabi.newpipe.R import org.schabi.newpipe.database.feed.model.FeedGroupEntity import org.schabi.newpipe.local.subscription.FeedGroupIcon @@ -45,4 +47,4 @@ data class FeedGroupReorderItem( override fun getDragDirs(): Int { return UP or DOWN } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt index ab47564ce..0404fbc24 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/FeedImportExportItem.kt @@ -9,7 +9,11 @@ import android.widget.TextView import androidx.annotation.DrawableRes import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.feed_import_export_group.* +import kotlinx.android.synthetic.main.feed_import_export_group.export_to_options +import kotlinx.android.synthetic.main.feed_import_export_group.import_export +import kotlinx.android.synthetic.main.feed_import_export_group.import_export_expand_icon +import kotlinx.android.synthetic.main.feed_import_export_group.import_export_options +import kotlinx.android.synthetic.main.feed_import_export_group.import_from_options import org.schabi.newpipe.R import org.schabi.newpipe.extractor.NewPipe import org.schabi.newpipe.extractor.exceptions.ExtractionException @@ -113,4 +117,4 @@ class FeedImportExportItem( ThemeHelper.resolveResourceIdFromAttr(listHolder.context, R.attr.ic_save), listHolder) previousBackupItem.setOnClickListener { onExportSelected() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderItem.kt index bbbc57f62..9798dac1b 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderItem.kt @@ -3,7 +3,7 @@ package org.schabi.newpipe.local.subscription.item import android.view.View.OnClickListener import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.header_item.* +import kotlinx.android.synthetic.main.header_item.header_title import org.schabi.newpipe.R class HeaderItem(val title: String, private val onClickListener: (() -> Unit)? = null) : Item() { @@ -16,4 +16,4 @@ class HeaderItem(val title: String, private val onClickListener: (() -> Unit)? = val listener: OnClickListener? = if (onClickListener != null) OnClickListener { onClickListener.invoke() } else null viewHolder.root.setOnClickListener(listener) } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderWithMenuItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderWithMenuItem.kt index cf7a4c01c..b8f8063a7 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderWithMenuItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/HeaderWithMenuItem.kt @@ -1,10 +1,13 @@ package org.schabi.newpipe.local.subscription.item -import android.view.View.* +import android.view.View.GONE +import android.view.View.OnClickListener +import android.view.View.VISIBLE import androidx.annotation.DrawableRes import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.header_with_menu_item.* +import kotlinx.android.synthetic.main.header_with_menu_item.header_menu_item +import kotlinx.android.synthetic.main.header_with_menu_item.header_title import org.schabi.newpipe.R class HeaderWithMenuItem( @@ -46,4 +49,4 @@ class HeaderWithMenuItem( private fun updateMenuItemVisibility(viewHolder: GroupieViewHolder) { viewHolder.header_menu_item.visibility = if (showMenuItem) VISIBLE else GONE } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt index 546441669..4f3678e95 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerIconItem.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.annotation.DrawableRes import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.picker_icon_item.* +import kotlinx.android.synthetic.main.picker_icon_item.icon_view import org.schabi.newpipe.R import org.schabi.newpipe.local.subscription.FeedGroupIcon @@ -17,4 +17,4 @@ class PickerIconItem(context: Context, val icon: FeedGroupIcon) : Item() { override fun bind(viewHolder: GroupieViewHolder, position: Int) { viewHolder.icon_view.setImageResource(iconRes) } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerSubscriptionItem.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerSubscriptionItem.kt index e0754e078..d90ac0d82 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerSubscriptionItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/item/PickerSubscriptionItem.kt @@ -5,7 +5,9 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions import com.nostra13.universalimageloader.core.ImageLoader import com.xwray.groupie.kotlinandroidextensions.GroupieViewHolder import com.xwray.groupie.kotlinandroidextensions.Item -import kotlinx.android.synthetic.main.picker_subscription_item.* +import kotlinx.android.synthetic.main.picker_subscription_item.selected_highlight +import kotlinx.android.synthetic.main.picker_subscription_item.thumbnail_view +import kotlinx.android.synthetic.main.picker_subscription_item.title_view import org.schabi.newpipe.R import org.schabi.newpipe.database.subscription.SubscriptionEntity import org.schabi.newpipe.util.AnimationUtils @@ -48,4 +50,4 @@ data class PickerSubscriptionItem(val subscriptionEntity: SubscriptionEntity, va override fun getId(): Long { return subscriptionEntity.uid } -} \ No newline at end of file +} 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 570819433..8bd18e309 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -80,8 +80,8 @@ import org.schabi.newpipe.player.playqueue.PlayQueueItemHolder; import org.schabi.newpipe.player.playqueue.PlayQueueItemTouchCallback; import org.schabi.newpipe.player.resolver.MediaSourceTag; import org.schabi.newpipe.player.resolver.VideoPlaybackResolver; -import org.schabi.newpipe.util.AnimationUtils; import org.schabi.newpipe.util.AndroidTvUtils; +import org.schabi.newpipe.util.AnimationUtils; import org.schabi.newpipe.util.KoreUtil; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; diff --git a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java index 41a2331ba..6f7d27c2c 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java @@ -5,8 +5,8 @@ import org.schabi.newpipe.streams.Mp4DashReader.Mdia; import org.schabi.newpipe.streams.Mp4DashReader.Mp4DashChunk; import org.schabi.newpipe.streams.Mp4DashReader.Mp4DashSample; import org.schabi.newpipe.streams.Mp4DashReader.Mp4Track; -import org.schabi.newpipe.streams.Mp4DashReader.TrunEntry; import org.schabi.newpipe.streams.Mp4DashReader.TrackKind; +import org.schabi.newpipe.streams.Mp4DashReader.TrunEntry; import org.schabi.newpipe.streams.io.SharpStream; import java.io.IOException; diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java index 179e32e4c..6dbcded48 100644 --- a/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java @@ -25,6 +25,7 @@ import android.view.ViewTreeObserver; import android.widget.SeekBar; import androidx.appcompat.widget.AppCompatSeekBar; + import org.schabi.newpipe.util.AndroidTvUtils; /** diff --git a/app/src/main/java/us/shandian/giga/get/DownloadMission.java b/app/src/main/java/us/shandian/giga/get/DownloadMission.java index 9ad73050b..3f651d2ee 100644 --- a/app/src/main/java/us/shandian/giga/get/DownloadMission.java +++ b/app/src/main/java/us/shandian/giga/get/DownloadMission.java @@ -6,8 +6,8 @@ import android.system.ErrnoException; import android.system.OsConstants; import android.util.Log; -import androidx.annotation.Nullable; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.schabi.newpipe.DownloaderImpl; 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 1fa987c88..bf9460b3d 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,9 +6,10 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; + import java.io.File; import java.util.ArrayList; 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 fc716b4f9..000900918 100644 --- a/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java +++ b/app/src/main/java/us/shandian/giga/io/FileStreamSAF.java @@ -3,9 +3,10 @@ package us.shandian.giga.io; import android.content.ContentResolver; import android.net.Uri; import android.os.ParcelFileDescriptor; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; + import org.schabi.newpipe.streams.io.SharpStream; import java.io.FileInputStream; 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 c1a63bb6a..8f6070ff4 100644 --- a/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java +++ b/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java @@ -8,6 +8,7 @@ import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.documentfile.provider.DocumentFile; 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 463c3ce5f..ad3ceec3d 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,11 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; import androidx.documentfile.provider.DocumentFile; +import androidx.fragment.app.Fragment; import org.schabi.newpipe.streams.io.SharpStream; 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 2ba091573..1542d3ff0 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,6 +1,7 @@ package us.shandian.giga.ui.common; import android.os.Bundle; + import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; 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 be0b0bb25..132cf83ea 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 @@ -17,7 +17,6 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.widget.CheckBox; import android.widget.Toast; import androidx.annotation.NonNull; diff --git a/app/src/main/res/menu/menu_local_playlist.xml b/app/src/main/res/menu/menu_local_playlist.xml index fdca9b31f..a955e9539 100644 --- a/app/src/main/res/menu/menu_local_playlist.xml +++ b/app/src/main/res/menu/menu_local_playlist.xml @@ -1,10 +1,9 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> - \ No newline at end of file +