mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-05-08 03:21:05 +03:00
Merge branch 'up' into 'develop'
Up See merge request ultrasonic/ultrasonic!919
This commit is contained in:
commit
93f2d716a0
@ -9,15 +9,15 @@ ktlint = "0.43.2"
|
||||
ktlintGradle = "11.0.0"
|
||||
detekt = "1.22.0"
|
||||
preferences = "1.2.0"
|
||||
media3 = "f3e450e783"
|
||||
media3 = "1.0.0-rc02"
|
||||
|
||||
androidSupport = "1.5.0"
|
||||
materialDesign = "1.7.0"
|
||||
materialDesign = "1.8.0"
|
||||
constraintLayout = "2.1.4"
|
||||
multidex = "2.0.1"
|
||||
room = "2.5.0"
|
||||
kotlin = "1.7.22"
|
||||
kotlinxCoroutines = "1.6.4-native-mt"
|
||||
kotlinxCoroutines = "1.6.4"
|
||||
kotlinxGuava = "1.6.4"
|
||||
viewModelKtx = "2.5.1"
|
||||
swipeRefresh = "1.1.0"
|
||||
@ -25,12 +25,12 @@ swipeRefresh = "1.1.0"
|
||||
retrofit = "2.9.0"
|
||||
jackson = "2.14.1"
|
||||
okhttp = "4.10.0"
|
||||
koin = "3.3.2"
|
||||
koin = "3.3.3"
|
||||
picasso = "2.8"
|
||||
|
||||
junit4 = "4.13.2"
|
||||
junit5 = "5.9.2"
|
||||
mockito = "5.0.0"
|
||||
mockito = "5.1.1"
|
||||
mockitoKotlin = "4.1.0"
|
||||
kluent = "1.72"
|
||||
apacheCodecs = "1.15"
|
||||
@ -64,11 +64,11 @@ navigationUiKtx = { module = "androidx.navigation:navigation-ui-ktx", ve
|
||||
navigationFeature = { module = "androidx.navigation:navigation-dynamic-features-fragment", version.ref = "navigation" }
|
||||
navigationSafeArgs = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation"}
|
||||
preferences = { module = "androidx.preference:preference", version.ref = "preferences" }
|
||||
media3common = { module = "com.github.androidx.media:media3-common", version.ref = "media3" }
|
||||
media3exoplayer = { module = "com.github.androidx.media:media3-exoplayer", version.ref = "media3" }
|
||||
media3datasource = { module = "com.github.androidx.media:media3-datasource", version.ref = "media3" }
|
||||
media3okhttp = { module = "com.github.androidx.media:media3-datasource-okhttp", version.ref = "media3" }
|
||||
media3session = { module = "com.github.androidx.media:media3-session", version.ref = "media3" }
|
||||
media3common = { module = "androidx.media3:media3-common", version.ref = "media3" }
|
||||
media3exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
|
||||
media3datasource = { module = "androidx.media3:media3-datasource", version.ref = "media3" }
|
||||
media3okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3" }
|
||||
media3session = { module = "androidx.media3:media3-session", version.ref = "media3" }
|
||||
swipeRefresh = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "swipeRefresh" }
|
||||
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
|
||||
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
|
||||
|
@ -1,5 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 7.3.1" type="baseline" client="gradle" dependencies="true" name="AGP (7.3.1)" variant="all" version="7.3.1">
|
||||
<issues format="6" by="lint 7.4.0" type="baseline" client="gradle" dependencies="true" name="AGP (7.4.0)" variant="all" version="7.4.0">
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" manager.notify(NOTIFICATION_ID, notification)"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/org/moire/ultrasonic/service/DownloadService.kt"
|
||||
line="260"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" notificationManagerCompat.notify(notification.notificationId, notification.notification)"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/org/moire/ultrasonic/service/JukeboxMediaPlayer.kt"
|
||||
line="194"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="PluralsCandidate"
|
||||
@ -8,7 +30,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="153"
|
||||
line="152"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@ -16,14 +38,14 @@
|
||||
id="TrustAllX509TrustManager"
|
||||
message="`checkClientTrusted` is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers">
|
||||
<location
|
||||
file="org/moire/ultrasonic/api/subsonic/SubsonicAPIClient$allowSelfSignedCertificates$trustManager$1.class"/>
|
||||
file="../core/subsonic-api/build/libs/subsonic-api.jar"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TrustAllX509TrustManager"
|
||||
message="`checkServerTrusted` is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers">
|
||||
<location
|
||||
file="org/moire/ultrasonic/api/subsonic/SubsonicAPIClient$allowSelfSignedCertificates$trustManager$1.class"/>
|
||||
file="../core/subsonic-api/build/libs/subsonic-api.jar"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
|
@ -186,7 +186,7 @@ class NavigationActivity : AppCompatActivity() {
|
||||
// Ask for permission to send notifications
|
||||
Util.ensurePermissionToPostNotification(this)
|
||||
|
||||
RxBus.dismissNowPlayingCommandObservable.subscribe {
|
||||
rxBusSubscription += RxBus.dismissNowPlayingCommandObservable.subscribe {
|
||||
nowPlayingHidden = true
|
||||
hideNowPlaying()
|
||||
}
|
||||
|
@ -13,12 +13,14 @@ import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import org.moire.ultrasonic.R
|
||||
import org.moire.ultrasonic.adapters.FolderSelectorBinder
|
||||
import org.moire.ultrasonic.domain.Artist
|
||||
import org.moire.ultrasonic.domain.GenericEntry
|
||||
import org.moire.ultrasonic.domain.Identifiable
|
||||
import org.moire.ultrasonic.service.RxBus
|
||||
import org.moire.ultrasonic.service.plusAssign
|
||||
import org.moire.ultrasonic.subsonic.DownloadHandler
|
||||
import org.moire.ultrasonic.util.Settings
|
||||
|
||||
@ -29,6 +31,8 @@ import org.moire.ultrasonic.util.Settings
|
||||
*/
|
||||
abstract class EntryListFragment<T : GenericEntry> : MultiListFragment<T>() {
|
||||
|
||||
private var rxBusSubscription: CompositeDisposable = CompositeDisposable()
|
||||
|
||||
/**
|
||||
* Whether to show the folder selector
|
||||
*/
|
||||
@ -61,7 +65,7 @@ abstract class EntryListFragment<T : GenericEntry> : MultiListFragment<T>() {
|
||||
// because it can't be initialized from inside the callback
|
||||
serverSettingsModel.toString()
|
||||
|
||||
RxBus.musicFolderChangedEventObservable.subscribe {
|
||||
rxBusSubscription += RxBus.musicFolderChangedEventObservable.subscribe {
|
||||
if (!listModel.isOffline()) {
|
||||
val currentSetting = listModel.activeServer
|
||||
currentSetting.musicFolderId = it.id
|
||||
@ -75,6 +79,11 @@ abstract class EntryListFragment<T : GenericEntry> : MultiListFragment<T>() {
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
rxBusSubscription.dispose()
|
||||
}
|
||||
|
||||
/**
|
||||
* What to do when the list has changed
|
||||
*/
|
||||
|
@ -16,6 +16,7 @@ import androidx.media3.session.DefaultMediaNotificationProvider
|
||||
import androidx.media3.session.MediaNotification
|
||||
import androidx.media3.session.MediaSession
|
||||
import androidx.media3.session.SessionCommand
|
||||
import com.google.common.collect.ImmutableList
|
||||
import org.koin.core.component.KoinComponent
|
||||
import org.koin.core.component.inject
|
||||
import org.moire.ultrasonic.R
|
||||
@ -36,7 +37,7 @@ class CustomNotificationProvider(ctx: Context) :
|
||||
|
||||
override fun addNotificationActions(
|
||||
mediaSession: MediaSession,
|
||||
mediaButtons: MutableList<CommandButton>,
|
||||
mediaButtons: ImmutableList<CommandButton>,
|
||||
builder: NotificationCompat.Builder,
|
||||
actionFactory: MediaNotification.ActionFactory
|
||||
): IntArray {
|
||||
@ -73,18 +74,19 @@ class CustomNotificationProvider(ctx: Context) :
|
||||
}
|
||||
return super.addNotificationActions(
|
||||
mediaSession,
|
||||
mediaButtons + tmp,
|
||||
ImmutableList.copyOf((mediaButtons + tmp)),
|
||||
builder,
|
||||
actionFactory
|
||||
)
|
||||
}
|
||||
|
||||
override fun getMediaButtons(
|
||||
session: MediaSession,
|
||||
playerCommands: Player.Commands,
|
||||
customLayout: MutableList<CommandButton>,
|
||||
customLayout: ImmutableList<CommandButton>,
|
||||
playWhenReady: Boolean
|
||||
): MutableList<CommandButton> {
|
||||
val commands = super.getMediaButtons(playerCommands, customLayout, playWhenReady)
|
||||
): ImmutableList<CommandButton> {
|
||||
val commands = super.getMediaButtons(session, playerCommands, customLayout, playWhenReady)
|
||||
|
||||
commands.forEachIndexed { index, command ->
|
||||
command.extras.putInt(COMMAND_KEY_COMPACT_VIEW_INDEX, index)
|
||||
|
@ -2,8 +2,19 @@
|
||||
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
a:layout_width="match_parent"
|
||||
a:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
a:orientation="vertical">
|
||||
|
||||
|
||||
<com.google.android.material.search.SearchView
|
||||
a:layout_width="match_parent"
|
||||
a:layout_height="match_parent"
|
||||
a:hint="@string/search.title"
|
||||
app:layout_anchor="@id/search_bar">
|
||||
<!-- Search suggestions/results go here (ScrollView, RecyclerView, etc.). -->
|
||||
|
||||
|
||||
|
||||
<include layout="@layout/list_parts_empty_view" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
@ -19,5 +30,6 @@
|
||||
a:layout_weight="1.0" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</com.google.android.material.search.SearchView>
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user