deps: update dependencies

This commit is contained in:
Miuzarte
2026-04-15 15:41:10 +08:00
parent b752ca4799
commit 6ae425681a
8 changed files with 58 additions and 27 deletions

View File

@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("io.github.miuzarte.scrcpyforandroid", appContext.packageName)
assertEquals(BuildConfig.APPLICATION_ID, appContext.packageName)
}
}

View File

@@ -1,5 +1,6 @@
package io.github.miuzarte.scrcpyforandroid.nativecore
import android.annotation.SuppressLint
import android.content.Context
import android.net.nsd.NsdManager
import android.net.nsd.NsdServiceInfo
@@ -72,6 +73,8 @@ internal object AdbMdnsDiscoverer {
Log.w(TAG, "stop discovery failed: $serviceType, error=$errorCode")
}
@Suppress("DEPRECATION")
@SuppressLint("NewApi")
override fun onServiceFound(serviceInfo: NsdServiceInfo) {
if (discoveryFinished.get()) return
Log.v(TAG, "service found: ${serviceInfo.serviceName}")
@@ -82,7 +85,7 @@ internal object AdbMdnsDiscoverer {
override fun onServiceResolved(serviceInfo: NsdServiceInfo) {
if (discoveryFinished.get()) return
val hostAddress = serviceInfo.host?.hostAddress ?: return
val hostAddress = serviceInfo.hostAddresses[0].hostAddress ?: return
if (hostAddress.isBlank()) return
if (!includeLanDevices) {

View File

@@ -73,6 +73,7 @@ import top.yukonga.miuix.kmp.preference.ArrowPreference
import top.yukonga.miuix.kmp.shapes.SmoothRoundedCornerShape
import top.yukonga.miuix.kmp.theme.MiuixTheme.colorScheme
import top.yukonga.miuix.kmp.theme.MiuixTheme.textStyles
import java.util.Locale.getDefault
@Composable
internal fun AboutScreen() {
@@ -269,7 +270,8 @@ private fun AboutContent(
)
}
Text(
text = "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})",
text = "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" +
" · ${BuildConfig.BUILD_TYPE.uppercase(getDefault())} BUILD",
modifier = Modifier
.fillMaxWidth()
.graphicsLayer {

View File

@@ -13,6 +13,7 @@ import java.security.GeneralSecurityException
import java.security.KeyStoreException
import java.util.UUID
@Suppress("DEPRECATION")
object PasswordRepository {
private const val PREFS_NAME = "LockscreenPasswords"
private const val KEY_ORDER = "__order"

View File

@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import io.github.miuzarte.scrcpyforandroid.BuildConfig
import kotlinx.coroutines.runBlocking
// not working in MIUI
@@ -28,7 +29,7 @@ class PictureInPictureActionReceiver : BroadcastReceiver() {
companion object {
const val ACTION_STOP_SCRCPY =
"io.github.miuzarte.scrcpyforandroid.action.STOP_SCRCPY_FROM_PIP"
"${BuildConfig.APPLICATION_ID}.action.STOP_SCRCPY_FROM_PIP"
private const val REQUEST_CODE_STOP_SCRCPY = 1
fun createIntentFilter(): IntentFilter = IntentFilter(ACTION_STOP_SCRCPY)