Skip to content

Commit

Permalink
Merge branch 'tytydraco:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kairusds authored Dec 8, 2021
2 parents b463534 + 6ae73cd commit 73d1a04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.draco.ladb"
minSdk 26
targetSdk 31
versionCode 30
versionName "1.7.2"
versionCode 31
versionName "1.7.3"

ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a'
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/java/com/draco/ladb/utils/ADB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import java.io.File
import java.io.IOException
import java.io.PrintStream
import java.lang.NumberFormatException
import java.util.concurrent.TimeUnit

class ADB(private val context: Context) {
companion object {
Expand Down Expand Up @@ -165,16 +166,16 @@ class ADB(private val context: Context) {
val pairShell = adb(true, listOf("pair", "localhost:$port"))

/* Sleep to allow shell to catch up */
Thread.sleep(1000)
Thread.sleep(5000)

/* Pipe pairing code */
PrintStream(pairShell?.outputStream).apply {
println(pairingCode)
flush()
}

/* Continue once finished pairing */
pairShell?.waitFor()
/* Continue once finished pairing (or 10s elapses) */
pairShell?.waitFor(10, TimeUnit.SECONDS)
}

/**
Expand Down

0 comments on commit 73d1a04

Please sign in to comment.