Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
fc67c019
Commit
fc67c019
authored
Jul 21, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround bug in AOSP code
Fix #2983,
https://issuetracker.google.com/issues/36984866
parent
2f02f9a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
SuRequestHandler.kt
...ain/java/com/topjohnwu/magisk/core/su/SuRequestHandler.kt
+7
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/core/su/SuRequestHandler.kt
View file @
fc67c019
...
@@ -68,8 +68,13 @@ abstract class SuRequestHandler(
...
@@ -68,8 +68,13 @@ abstract class SuRequestHandler(
private
suspend
fun
init
(
name
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
private
suspend
fun
init
(
name
:
String
)
=
withContext
(
Dispatchers
.
IO
)
{
try
{
try
{
if
(
Const
.
Version
.
atLeastCanary
())
{
if
(
Const
.
Version
.
atLeastCanary
())
{
LocalServerSocket
(
name
).
use
{
val
server
=
LocalServerSocket
(
name
)
socket
=
async
{
it
.
accept
()
}.
timedAwait
()
?:
throw
SocketError
()
// Do NOT use Closable?.use(block) here as LocalServerSocket does
// not implement Closable on older Android platforms
try
{
socket
=
async
{
server
.
accept
()
}.
timedAwait
()
?:
throw
SocketError
()
}
finally
{
server
.
close
()
}
}
}
else
{
}
else
{
socket
=
LocalSocket
()
socket
=
LocalSocket
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment