mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Fix dataChannel cannot callback in Xposed Environment in YukiHookDataChannel
This commit is contained in:
@@ -136,7 +136,7 @@ class YukiHookDataChannel private constructor() {
|
|||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
private fun isCurrentBroadcast(context: Context?) = runCatching {
|
private fun isCurrentBroadcast(context: Context?) = runCatching {
|
||||||
isXposedEnvironment || (((context ?: receiverContext)
|
context is Application || isXposedEnvironment || (((context ?: receiverContext)
|
||||||
?.getSystemService(ACTIVITY_SERVICE) as? ActivityManager?)
|
?.getSystemService(ACTIVITY_SERVICE) as? ActivityManager?)
|
||||||
?.getRunningTasks(9999)?.filter { context?.javaClass?.name == it?.topActivity?.className }?.size ?: 0) > 0
|
?.getRunningTasks(9999)?.filter { context?.javaClass?.name == it?.topActivity?.className }?.size ?: 0) > 0
|
||||||
}.getOrNull() ?: yLoggerW(msg = "Couldn't got current Activity status because a SecurityException blocked it").let { false }
|
}.getOrNull() ?: yLoggerW(msg = "Couldn't got current Activity status because a SecurityException blocked it").let { false }
|
||||||
|
Reference in New Issue
Block a user