mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-13 16:07:16 +03:00
Update dependency androidx.core:core-ktx to v1.9.0
This commit is contained in:
parent
3e5ed0ab89
commit
d5bb78cec1
@ -6,3 +6,7 @@ dependencies {
|
|||||||
implementation libs.roomKtx
|
implementation libs.roomKtx
|
||||||
kapt libs.room
|
kapt libs.room
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'org.moire.ultrasonic.subsonic.domain'
|
||||||
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="org.moire.ultrasonic.subsonic.domain">
|
|
||||||
</manifest>
|
</manifest>
|
@ -3,8 +3,8 @@
|
|||||||
gradle = "7.5.1"
|
gradle = "7.5.1"
|
||||||
|
|
||||||
navigation = "2.5.1"
|
navigation = "2.5.1"
|
||||||
gradlePlugin = "7.2.2"
|
gradlePlugin = "7.3.0"
|
||||||
androidxcore = "1.8.0"
|
androidxcore = "1.9.0"
|
||||||
ktlint = "0.43.2"
|
ktlint = "0.43.2"
|
||||||
ktlintGradle = "10.3.0"
|
ktlintGradle = "10.3.0"
|
||||||
detekt = "1.19.0"
|
detekt = "1.19.0"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ext.versions = [
|
ext.versions = [
|
||||||
minSdk : 21,
|
minSdk : 21,
|
||||||
targetSdk : 33,
|
targetSdk : 33,
|
||||||
compileSdk : 31,
|
compileSdk : 33,
|
||||||
]
|
]
|
@ -78,6 +78,7 @@ android {
|
|||||||
warning 'ImpliedQuantity'
|
warning 'ImpliedQuantity'
|
||||||
disable 'ObsoleteLintCustomCheck'
|
disable 'ObsoleteLintCustomCheck'
|
||||||
}
|
}
|
||||||
|
namespace 'org.moire.ultrasonic'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="org.moire.ultrasonic"
|
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
@ -12,9 +12,9 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
|
import android.os.Build
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import org.koin.android.ext.android.inject
|
|
||||||
import org.koin.core.component.KoinComponent
|
import org.koin.core.component.KoinComponent
|
||||||
import org.koin.core.component.inject
|
import org.koin.core.component.inject
|
||||||
import org.moire.ultrasonic.app.UApp
|
import org.moire.ultrasonic.app.UApp
|
||||||
@ -110,7 +110,12 @@ class MediaPlayerLifecycleSupport : KoinComponent {
|
|||||||
|
|
||||||
if (intentAction == Constants.CMD_PROCESS_KEYCODE) {
|
if (intentAction == Constants.CMD_PROCESS_KEYCODE) {
|
||||||
if (intent.extras != null) {
|
if (intent.extras != null) {
|
||||||
val event = intent.extras!![Intent.EXTRA_KEY_EVENT] as KeyEvent?
|
val event = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
intent.extras!!.getParcelable(Intent.EXTRA_KEY_EVENT, KeyEvent::class.java)
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
intent.extras!![Intent.EXTRA_KEY_EVENT] as KeyEvent?
|
||||||
|
}
|
||||||
event.ifNotNull { handleKeyEvent(it) }
|
event.ifNotNull { handleKeyEvent(it) }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -130,7 +135,7 @@ class MediaPlayerLifecycleSupport : KoinComponent {
|
|||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
val extras = intent.extras ?: return
|
val extras = intent.extras ?: return
|
||||||
|
|
||||||
Timber.i("Headset event for: %s", extras["name"])
|
Timber.i("Headset event for: %s", extras.getString("name"))
|
||||||
|
|
||||||
val state = extras.getInt("state")
|
val state = extras.getInt("state")
|
||||||
|
|
||||||
|
@ -509,6 +509,7 @@ object Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
fun getVersionName(context: Context): String? {
|
fun getVersionName(context: Context): String? {
|
||||||
var versionName: String? = null
|
var versionName: String? = null
|
||||||
val pm = context.packageManager
|
val pm = context.packageManager
|
||||||
|
Loading…
x
Reference in New Issue
Block a user