Skip to content

Commit bce437e

Browse files
committed
refactor: remove redundant min sdk checks
1 parent 79c181d commit bce437e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

sysbridge/src/main/java/io/github/sds100/keymapper/sysbridge/adb/AdbKey.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import rikka.core.ktx.unsafeLazy
4545

4646
private const val TAG = "AdbKey"
4747

48-
@RequiresApi(Build.VERSION_CODES.M)
4948
internal class AdbKey(private val adbKeyStore: AdbKeyStore, name: String) {
5049

5150
companion object {

sysbridge/src/main/java/io/github/sds100/keymapper/sysbridge/adb/AdbManager.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ class AdbManagerImpl @Inject constructor(@ApplicationContext private val ctx: Co
7676

7777
override suspend fun pair(code: String): KMResult<Unit> {
7878
return pairMutex.withLock {
79-
val port = adbPairMdns.discoverPort()
80-
81-
if (port == null) {
82-
return@withLock AdbError.ServerNotFound
83-
}
79+
val port = adbPairMdns.discoverPort() ?: return@withLock AdbError.ServerNotFound
8480

8581
return@withLock getAdbKey().then { key ->
8682
val pairingClient = AdbPairingClient(LOCALHOST, port, code, key)

0 commit comments

Comments
 (0)