5.3.1 commit
This commit is contained in:
parent
c49af77af8
commit
ae376422a4
|
@ -22,11 +22,6 @@ Apache License 2.0
|
||||||
|
|
||||||
[com.squareup.okhttp3](https://github.com/square/okhttp/blob/master/LICENSE.txt) Apache License 2.0
|
[com.squareup.okhttp3](https://github.com/square/okhttp/blob/master/LICENSE.txt) Apache License 2.0
|
||||||
|
|
||||||
<!-- [com.squareup.okio](https://github.com/square/okio/blob/master/LICENSE.txt) Apache License 2.0
|
|
||||||
-->
|
|
||||||
|
|
||||||
[org.greenrobot:eventbus](https://github.com/greenrobot/EventBus/blob/master/LICENSE) Apache License 2.0
|
|
||||||
|
|
||||||
[io.reactivex.rxjava2](https://github.com/ReactiveX/RxJava/blob/3.x/LICENSE) Apache License 2.0
|
[io.reactivex.rxjava2](https://github.com/ReactiveX/RxJava/blob/3.x/LICENSE) Apache License 2.0
|
||||||
|
|
||||||
[com.joanzapata.iconify](https://github.com/JoanZapata/android-iconify/blob/master/LICENSE.txt) Apache License 2.0
|
[com.joanzapata.iconify](https://github.com/JoanZapata/android-iconify/blob/master/LICENSE.txt) Apache License 2.0
|
||||||
|
|
|
@ -159,8 +159,8 @@ android {
|
||||||
// Version code schema (not used):
|
// Version code schema (not used):
|
||||||
// "1.2.3-beta4" -> 1020304
|
// "1.2.3-beta4" -> 1020304
|
||||||
// "1.2.3" -> 1020395
|
// "1.2.3" -> 1020395
|
||||||
versionCode 3020145
|
versionCode 3020146
|
||||||
versionName "5.3.0"
|
versionName "5.3.1"
|
||||||
|
|
||||||
def commit = ""
|
def commit = ""
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -36,12 +36,6 @@
|
||||||
website="https://github.com/google/conscrypt"
|
website="https://github.com/google/conscrypt"
|
||||||
license="Apache 2.0"
|
license="Apache 2.0"
|
||||||
licenseText="LICENSE_APACHE-2.0.txt" />
|
licenseText="LICENSE_APACHE-2.0.txt" />
|
||||||
<library
|
|
||||||
name="EventBus"
|
|
||||||
author="greenrobot"
|
|
||||||
website="https://github.com/greenrobot/EventBus"
|
|
||||||
license="Apache 2.0"
|
|
||||||
licenseText="LICENSE_APACHE-2.0.txt" />
|
|
||||||
<library
|
<library
|
||||||
name="ExoPlayer"
|
name="ExoPlayer"
|
||||||
author="Google"
|
author="Google"
|
||||||
|
|
|
@ -831,7 +831,7 @@ class PlaybackService : MediaSessionService() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getNextInQueue(currentMedia: Playable?): Playable? {
|
private fun getNextInQueue(currentMedia: Playable?): Playable? {
|
||||||
Logd(TAG, "*** expensive call getNextInQueue currentMedia: ${currentMedia?.getEpisodeTitle()}")
|
Logd(TAG, "call getNextInQueue currentMedia: ${currentMedia?.getEpisodeTitle()}")
|
||||||
if (currentMedia !is FeedMedia) {
|
if (currentMedia !is FeedMedia) {
|
||||||
Logd(TAG, "getNextInQueue(), but playable not an instance of FeedMedia, so not proceeding")
|
Logd(TAG, "getNextInQueue(), but playable not an instance of FeedMedia, so not proceeding")
|
||||||
writeNoMediaPlaying()
|
writeNoMediaPlaying()
|
||||||
|
|
|
@ -12,7 +12,6 @@ import ac.mdiq.podcini.storage.model.download.DownloadResult
|
||||||
import ac.mdiq.podcini.storage.model.feed.*
|
import ac.mdiq.podcini.storage.model.feed.*
|
||||||
import ac.mdiq.podcini.storage.model.feed.FeedItemFilter.Companion.unfiltered
|
import ac.mdiq.podcini.storage.model.feed.FeedItemFilter.Companion.unfiltered
|
||||||
import ac.mdiq.podcini.storage.model.feed.FeedPreferences.Companion.TAG_ROOT
|
import ac.mdiq.podcini.storage.model.feed.FeedPreferences.Companion.TAG_ROOT
|
||||||
import ac.mdiq.podcini.util.FeedItemPermutors
|
|
||||||
import ac.mdiq.podcini.util.FeedItemPermutors.getPermutor
|
import ac.mdiq.podcini.util.FeedItemPermutors.getPermutor
|
||||||
import ac.mdiq.podcini.util.Logd
|
import ac.mdiq.podcini.util.Logd
|
||||||
import ac.mdiq.podcini.util.LongList
|
import ac.mdiq.podcini.util.LongList
|
||||||
|
@ -213,7 +212,6 @@ object DBReader {
|
||||||
val indexMediaId = cursor.getColumnIndexOrThrow(PodDBAdapter.SELECT_KEY_MEDIA_ID)
|
val indexMediaId = cursor.getColumnIndexOrThrow(PodDBAdapter.SELECT_KEY_MEDIA_ID)
|
||||||
do {
|
do {
|
||||||
val item = FeedItemCursorMapper.convert(cursor)
|
val item = FeedItemCursorMapper.convert(cursor)
|
||||||
// Log.d(TAG, "extractItemlistFromCursor item ${item.title}")
|
|
||||||
result.add(item)
|
result.add(item)
|
||||||
if (!cursor.isNull(indexMediaId)) item.setMedia(FeedMediaCursorMapper.convert(cursor))
|
if (!cursor.isNull(indexMediaId)) item.setMedia(FeedMediaCursorMapper.convert(cursor))
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
|
@ -543,18 +541,17 @@ object DBReader {
|
||||||
* @return The FeedItem next in queue or null if the FeedItem could not be found.
|
* @return The FeedItem next in queue or null if the FeedItem could not be found.
|
||||||
*/
|
*/
|
||||||
fun getNextInQueue(item: FeedItem): FeedItem? {
|
fun getNextInQueue(item: FeedItem): FeedItem? {
|
||||||
Logd(TAG, "*** expensive call getNextInQueue() with: itemId = [${item.id}]")
|
Logd(TAG, "getNextInQueue() with: itemId = [${item.id}]")
|
||||||
val adapter = getInstance()
|
val adapter = getInstance()
|
||||||
adapter.open()
|
adapter.open()
|
||||||
try {
|
try {
|
||||||
var nextItem: FeedItem? = null
|
var nextItem: FeedItem? = null
|
||||||
try {
|
try {
|
||||||
// TODO: these calls are expensive
|
|
||||||
adapter.getNextInQueue(item).use { cursor ->
|
adapter.getNextInQueue(item).use { cursor ->
|
||||||
val list = extractItemlistFromCursor(adapter, cursor)
|
val list = extractItemlistFromCursor(adapter, cursor)
|
||||||
if (list.isNotEmpty()) {
|
if (list.isNotEmpty()) {
|
||||||
nextItem = list[0]
|
nextItem = list[0]
|
||||||
loadAdditionalFeedItemListData(list)
|
loadAdditionalFeedItemListData(listOf(list[0]))
|
||||||
}
|
}
|
||||||
return nextItem
|
return nextItem
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,9 +521,7 @@ import java.util.concurrent.TimeUnit
|
||||||
events.add(FlowEvent.QueueEvent.removed(item))
|
events.add(FlowEvent.QueueEvent.removed(item))
|
||||||
updatedItems.add(item)
|
updatedItems.add(item)
|
||||||
queueModified = true
|
queueModified = true
|
||||||
} else {
|
} else Log.e(TAG, "removeQueueItem - item not in queue:$itemId")
|
||||||
Log.v(TAG, "removeQueueItem - item not in queue:$itemId")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (queueModified) {
|
if (queueModified) {
|
||||||
adapter.setQueue(queue)
|
adapter.setQueue(queue)
|
||||||
|
|
|
@ -245,17 +245,17 @@ import java.util.*
|
||||||
FlowEvent.QueueEvent.Action.REMOVED, FlowEvent.QueueEvent.Action.IRREVERSIBLE_REMOVED -> {
|
FlowEvent.QueueEvent.Action.REMOVED, FlowEvent.QueueEvent.Action.IRREVERSIBLE_REMOVED -> {
|
||||||
if (event.item != null) {
|
if (event.item != null) {
|
||||||
val position: Int = FeedItemUtil.indexOfItemWithId(queue.toList(), event.item.id)
|
val position: Int = FeedItemUtil.indexOfItemWithId(queue.toList(), event.item.id)
|
||||||
queue.removeAt(position)
|
if (position >= 0) {
|
||||||
recyclerAdapter?.notifyItemRemoved(position)
|
queue.removeAt(position)
|
||||||
|
recyclerAdapter?.notifyItemRemoved(position)
|
||||||
|
} else Log.e(TAG, "Trying to remove item non-existent from queue ${event.item.id} ${event.item.title}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FlowEvent.QueueEvent.Action.CLEARED -> {
|
FlowEvent.QueueEvent.Action.CLEARED -> {
|
||||||
queue.clear()
|
queue.clear()
|
||||||
recyclerAdapter?.updateItems(queue)
|
recyclerAdapter?.updateItems(queue)
|
||||||
}
|
}
|
||||||
FlowEvent.QueueEvent.Action.MOVED -> return
|
FlowEvent.QueueEvent.Action.MOVED, FlowEvent.QueueEvent.Action.ADDED_ITEMS, FlowEvent.QueueEvent.Action.DELETED_MEDIA -> return
|
||||||
FlowEvent.QueueEvent.Action.ADDED_ITEMS -> return
|
|
||||||
FlowEvent.QueueEvent.Action.DELETED_MEDIA -> return
|
|
||||||
}
|
}
|
||||||
recyclerAdapter?.updateDragDropEnabled()
|
recyclerAdapter?.updateDragDropEnabled()
|
||||||
refreshToolbarState()
|
refreshToolbarState()
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
## 5.3.1
|
||||||
|
|
||||||
|
* fixed crash issue on some device when attempting to remove item from queue multiple times
|
||||||
|
* improved efficiency of getNextInQueue in DBReader
|
||||||
|
|
||||||
## 5.3.0
|
## 5.3.0
|
||||||
|
|
||||||
* change normal scope to life cycle scope when possible
|
* change normal scope to life cycle scope when possible
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
Version 5.3.1 brings several changes:
|
||||||
|
|
||||||
|
* fixed crash issue on some device when attempting to remove item from queue multiple times
|
||||||
|
* improved efficiency of getNextInQueue in DBReader
|
|
@ -4,6 +4,8 @@ android.jetifier.ignorelist=bcprov-jdk15on
|
||||||
android.nonTransitiveRClass=false
|
android.nonTransitiveRClass=false
|
||||||
android.nonFinalResIds=false
|
android.nonFinalResIds=false
|
||||||
|
|
||||||
|
org.gradle.caching=true
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx2048m
|
org.gradle.jvmargs=-Xmx2048m
|
||||||
|
|
||||||
android.defaults.buildfeatures.buildconfig=true
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
|
Loading…
Reference in New Issue