diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7776f34..6509b13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: androidArch: x86_64 steps: - name: Check out repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: submodules: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eecc503..6d0f2f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: echo "version=${version}" >> "${GITHUB_OUTPUT}" - name: Check out repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - name: Create release uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 diff --git a/app/src/main/java/com/chiller3/rsaf/rclone/Authorizer.kt b/app/src/main/java/com/chiller3/rsaf/rclone/Authorizer.kt index 3b79c46..b43fcd3 100644 --- a/app/src/main/java/com/chiller3/rsaf/rclone/Authorizer.kt +++ b/app/src/main/java/com/chiller3/rsaf/rclone/Authorizer.kt @@ -156,6 +156,7 @@ object Authorizer { if (line.contains(MARKER_CODE_START)) { inCode = true } else if (line.contains(MARKER_CODE_STOP)) { + @Suppress("AssignedValueIsNeverRead") inCode = false listener.onAuthorizeCode(code.toString()) break diff --git a/app/src/main/java/com/chiller3/rsaf/rclone/KeepAliveService.kt b/app/src/main/java/com/chiller3/rsaf/rclone/KeepAliveService.kt index 73a8681..68cf83b 100644 --- a/app/src/main/java/com/chiller3/rsaf/rclone/KeepAliveService.kt +++ b/app/src/main/java/com/chiller3/rsaf/rclone/KeepAliveService.kt @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Andrew Gunnerson + * SPDX-FileCopyrightText: 2024-2026 Andrew Gunnerson * SPDX-License-Identifier: GPL-3.0-only */ @@ -102,6 +102,7 @@ class KeepAliveService : Service() { synchronized(monitorThread) { monitorState = MonitorState.STOPPED + @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (monitorThread as Object).notify() } @@ -208,6 +209,7 @@ class KeepAliveService : Service() { } } + @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (monitorThread as Object).wait(1000) } } diff --git a/app/src/main/java/com/chiller3/rsaf/rclone/RcloneProvider.kt b/app/src/main/java/com/chiller3/rsaf/rclone/RcloneProvider.kt index 642a2fc..be73983 100644 --- a/app/src/main/java/com/chiller3/rsaf/rclone/RcloneProvider.kt +++ b/app/src/main/java/com/chiller3/rsaf/rclone/RcloneProvider.kt @@ -5,6 +5,7 @@ package com.chiller3.rsaf.rclone +import android.annotation.SuppressLint import android.content.BroadcastReceiver import android.content.Context import android.content.Intent @@ -148,6 +149,8 @@ class RcloneProvider : DocumentsProvider(), SharedPreferences.OnSharedPreference Log.w(TAG, "Truncating dynamic shortcuts from $rank to $maxShortcuts") } + // We can't report usage because the shortcut opens DocumentsUI directly. + @SuppressLint("ReportShortcutUsage") if (!ShortcutManagerCompat.setDynamicShortcuts(context, shortcuts)) { Log.w(TAG, "Failed to update dynamic shortcuts") } diff --git a/app/src/main/java/com/chiller3/rsaf/settings/EditRemoteScreen.kt b/app/src/main/java/com/chiller3/rsaf/settings/EditRemoteScreen.kt index 213fac5..4fa6c30 100644 --- a/app/src/main/java/com/chiller3/rsaf/settings/EditRemoteScreen.kt +++ b/app/src/main/java/com/chiller3/rsaf/settings/EditRemoteScreen.kt @@ -385,11 +385,9 @@ private fun EditRemoteContent( else -> throw IllegalStateException("Invalid reason: $reason") } - @Suppress("AssignedValueIsNeverRead") showVfsWarningDialog = null }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showVfsWarningDialog = null } ) @@ -406,11 +404,9 @@ private fun EditRemoteContent( else -> throw IllegalStateException("Invalid action: $action") } - @Suppress("AssignedValueIsNeverRead") showRemoteNameDialog = null }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showRemoteNameDialog = null }, ) @@ -422,11 +418,9 @@ private fun EditRemoteContent( initialOptions = state.config?.vfsOptions!!, onSelect = { options, reload -> onVfsOptionsChange(options, reload) - @Suppress("AssignedValueIsNeverRead") showVfsOptionsDialog = false }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showVfsOptionsDialog = false }, ) diff --git a/app/src/main/java/com/chiller3/rsaf/settings/ErrorDetailsDialog.kt b/app/src/main/java/com/chiller3/rsaf/settings/ErrorDetailsDialog.kt index ed766d6..aa2fbfa 100644 --- a/app/src/main/java/com/chiller3/rsaf/settings/ErrorDetailsDialog.kt +++ b/app/src/main/java/com/chiller3/rsaf/settings/ErrorDetailsDialog.kt @@ -25,6 +25,7 @@ import com.chiller3.rsaf.R fun ErrorDetailsDialog( message: String?, onDismiss: () -> Unit, + showCopy: Boolean = true, ) { val context = LocalContext.current @@ -46,7 +47,7 @@ fun ErrorDetailsDialog( } }, dismissButton = { - message?.let { + if (message != null && showCopy) { TextButton( onClick = { val clipboardManager = context.getSystemService(ClipboardManager::class.java) diff --git a/app/src/main/java/com/chiller3/rsaf/settings/InteractiveConfigurationScreen.kt b/app/src/main/java/com/chiller3/rsaf/settings/InteractiveConfigurationScreen.kt index 7883974..70c9314 100644 --- a/app/src/main/java/com/chiller3/rsaf/settings/InteractiveConfigurationScreen.kt +++ b/app/src/main/java/com/chiller3/rsaf/settings/InteractiveConfigurationScreen.kt @@ -222,7 +222,6 @@ private fun InteractiveConfigurationContent( input.edit { replace(0, length, currentOrDefault) } - @Suppress("AssignedValueIsNeverRead") loadedOnce = true } } @@ -338,11 +337,9 @@ private fun InteractiveConfigurationContent( cmd = cmd, onReceive = { input.edit { replace(0, length, it) } - @Suppress("AssignedValueIsNeverRead") showAuthorizeDialog = null }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showAuthorizeDialog = null }, ) diff --git a/app/src/main/java/com/chiller3/rsaf/settings/SettingsScreen.kt b/app/src/main/java/com/chiller3/rsaf/settings/SettingsScreen.kt index be24a41..af34494 100644 --- a/app/src/main/java/com/chiller3/rsaf/settings/SettingsScreen.kt +++ b/app/src/main/java/com/chiller3/rsaf/settings/SettingsScreen.kt @@ -646,11 +646,9 @@ private fun SettingsContent( else -> throw IllegalStateException("Invalid reason: $reason") } - @Suppress("AssignedValueIsNeverRead") showVfsWarningDialog = null }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showVfsWarningDialog = null } ) @@ -662,11 +660,9 @@ private fun SettingsContent( existingRemotes = remotes.map { it.name }, onSelect = { name -> onRemoteAdd(name) - @Suppress("AssignedValueIsNeverRead") showRemoteNameDialog = null }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showRemoteNameDialog = null }, ) @@ -677,11 +673,9 @@ private fun SettingsContent( initialTimeout = inactivityTimeout, onSelect = { timeout -> onInactivityTimeoutChange(timeout) - @Suppress("AssignedValueIsNeverRead") showInactivityTimeoutDialog = false }, onDismiss = { - @Suppress("AssignedValueIsNeverRead") showInactivityTimeoutDialog = false }, ) diff --git a/app/src/main/java/com/chiller3/rsaf/ui/Preferences.kt b/app/src/main/java/com/chiller3/rsaf/ui/Preferences.kt index 9a16619..00efe85 100644 --- a/app/src/main/java/com/chiller3/rsaf/ui/Preferences.kt +++ b/app/src/main/java/com/chiller3/rsaf/ui/Preferences.kt @@ -181,12 +181,14 @@ fun Preference( private fun PreferenceSwitch( checked: Boolean, onCheckedChange: ((Boolean) -> Unit)?, + modifier: Modifier = Modifier, enabled: Boolean = true, switchColors: SwitchColors = PreferenceDefaults.switchColors(), ) { Switch( checked = checked, onCheckedChange = onCheckedChange, + modifier = modifier, enabled = enabled, thumbContent = { Icon( diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 56139c0..505c08d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ androidx-preference = "1.2.1" androidx-test-espresso-core = "3.7.0" jgit = "7.6.0.202603022253-r" junit = "1.3.0" -kotlin = "2.3.21" +kotlin = "2.4.0" material = "1.14.0" spotbugs = "4.9.8" tink-android = "1.21.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 8460567..cadbab1 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -3200,36 +3200,28 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - - - - - + + @@ -3237,164 +3229,164 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -3429,12 +3421,12 @@ - - - + + + - - + + @@ -3453,14 +3445,6 @@ - - - - - - - - @@ -3469,6 +3453,14 @@ + + + + + + + + @@ -3477,12 +3469,12 @@ - - - + + + - - + + @@ -3538,46 +3530,46 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + diff --git a/rcbridge/go.mod b/rcbridge/go.mod index 570d4c6..9d99ef9 100644 --- a/rcbridge/go.mod +++ b/rcbridge/go.mod @@ -3,8 +3,8 @@ module rcbridge go 1.25.0 require ( - github.com/rclone/rclone v1.74.2 - golang.org/x/mobile v0.0.0-20260520154334-0e4426e1883d + github.com/rclone/rclone v1.74.3 + golang.org/x/mobile v0.0.0-20260602190626-68735029466e ) // https://github.com/chenxiaolong/RSAF/issues/268 diff --git a/rcbridge/go.sum b/rcbridge/go.sum index 017d458..b8c5cf1 100644 --- a/rcbridge/go.sum +++ b/rcbridge/go.sum @@ -516,8 +516,8 @@ github.com/rclone/Proton-API-Bridge v1.0.3 h1:Bs7RC4xCFSN0BPIYVda/BNxp0qo3NV0gB2 github.com/rclone/Proton-API-Bridge v1.0.3/go.mod h1:26RAest751Ofk+F/d8xtl4UyWXrZvMQwn39U8rm/WKM= github.com/rclone/go-proton-api v1.0.2 h1:cJtJUab0MGJ3C6q5kiEJs3pbyhSLnOKMyYOQehA0PBc= github.com/rclone/go-proton-api v1.0.2/go.mod h1:LB2kCEaZMzNn3ocdz+qYfxXmuLxxN0ka62KJd2x53Bc= -github.com/rclone/rclone v1.74.2 h1:+dpmKO46pt1RYRN+/xOE5uXsPU5V3azyjdHOEpXq0Mo= -github.com/rclone/rclone v1.74.2/go.mod h1:qPZj+8uJBJEwNonEovOyGqSHgM9AdiQr1S7JGlALhNc= +github.com/rclone/rclone v1.74.3 h1:a2wln7pvEa0tS1WIZJKulEkVjxgC1DkCoyxYydkdiSY= +github.com/rclone/rclone v1.74.3/go.mod h1:t5Mh86PO49DD7xlPt0trnK/aNf2Z3M0uip4l1Jqwiv8= github.com/relvacode/iso8601 v1.7.0 h1:BXy+V60stMP6cpswc+a93Mq3e65PfXCgDFfhvNNGrdo= github.com/relvacode/iso8601 v1.7.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rfjakob/eme v1.2.0 h1:8dAHL+WVAw06+7DkRKnRiFp1JL3QjcJEZFqDnndUaSI= @@ -685,8 +685,8 @@ golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20260520154334-0e4426e1883d h1:pWrEKZvKeqE2xPrylgBjgCyJSpPPt3L2WG2DmA+Xccg= -golang.org/x/mobile v0.0.0-20260520154334-0e4426e1883d/go.mod h1:ltIbhcRzKgwHa4ZxKJeiv0nyzcXUUYCqMyO0Y+vPmXw= +golang.org/x/mobile v0.0.0-20260602190626-68735029466e h1:YxPXu/HWDTcSSrzSX+sCltsfcNCa/ZYVG43oslMouNU= +golang.org/x/mobile v0.0.0-20260602190626-68735029466e/go.mod h1:ltIbhcRzKgwHa4ZxKJeiv0nyzcXUUYCqMyO0Y+vPmXw= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=