mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-10-07 13:36:38 -04:00
Fix app running without root
This commit is contained in:
1 parent
2793d209a4
commit
0ac19e3a4e
1 file changed
+2
-1
@@ -6,6 +6,7 @@ import android.content.Intent
|
||||
import android.content.ServiceConnection
|
||||
import android.os.IBinder
|
||||
import androidx.core.content.getSystemService
|
||||
import com.topjohnwu.magisk.core.Info
|
||||
import com.topjohnwu.superuser.Shell
|
||||
import com.topjohnwu.superuser.ShellUtils
|
||||
import com.topjohnwu.superuser.ipc.RootService
|
||||
@@ -105,7 +106,7 @@ class RootUtils(stub: Any?) : RootService() {
|
||||
|
||||
fun await() {
|
||||
// We cannot await on the main thread
|
||||
if (!ShellUtils.onMainThread())
|
||||
if (Info.isRooted && !ShellUtils.onMainThread())
|
||||
acquireSharedInterruptibly(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user