Skip to content

Commit

Permalink
fix(shizuku): binder haven't been received
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Nov 7, 2023
1 parent ff9c70e commit a933360
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/src/main/java/li/songe/gkd/shizuku/ShizukuApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ fun IActivityTaskManager.safeGetTasks(): List<ActivityManager.RunningTaskInfo>?
}
}
}
return when (getTasksFcType) {
1 -> this.getTasks(1)
3 -> this.getTasks(1, false, true)
4 -> this.getTasks(1, false, true, Display.DEFAULT_DISPLAY)
else -> null
return try {
// https://bugly.qq.com/v2/crash-reporting/crashes/d0ce46b353/106137?pid=1
// binder haven't been received
when (getTasksFcType) {
1 -> this.getTasks(1)
3 -> this.getTasks(1, false, true)
4 -> this.getTasks(1, false, true, Display.DEFAULT_DISPLAY)
else -> null
}
} catch (e: Exception) {
null
}
}

Expand Down

0 comments on commit a933360

Please sign in to comment.