Commit 0ac19e3a authored by topjohnwu's avatar topjohnwu

Fix app running without root

parent 2793d209
...@@ -6,6 +6,7 @@ import android.content.Intent ...@@ -6,6 +6,7 @@ import android.content.Intent
import android.content.ServiceConnection import android.content.ServiceConnection
import android.os.IBinder import android.os.IBinder
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.ShellUtils import com.topjohnwu.superuser.ShellUtils
import com.topjohnwu.superuser.ipc.RootService import com.topjohnwu.superuser.ipc.RootService
...@@ -105,7 +106,7 @@ class RootUtils(stub: Any?) : RootService() { ...@@ -105,7 +106,7 @@ class RootUtils(stub: Any?) : RootService() {
fun await() { fun await() {
// We cannot await on the main thread // We cannot await on the main thread
if (!ShellUtils.onMainThread()) if (Info.isRooted && !ShellUtils.onMainThread())
acquireSharedInterruptibly(1) acquireSharedInterruptibly(1)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment