Modify remove fetch installed packages list log and only print for empty list in FrameworkHooker

This commit is contained in:
2023-01-20 02:33:25 +08:00
parent 27e068898e
commit 2d9550d5b9

View File

@@ -53,7 +53,6 @@ import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker
import com.highcapable.yukihookapi.hook.factory.field
import com.highcapable.yukihookapi.hook.factory.hasMethod
import com.highcapable.yukihookapi.hook.factory.method
import com.highcapable.yukihookapi.hook.log.loggerD
import com.highcapable.yukihookapi.hook.log.loggerE
import com.highcapable.yukihookapi.hook.log.loggerI
import com.highcapable.yukihookapi.hook.log.loggerW
@@ -245,7 +244,7 @@ object FrameworkHooker : YukiBaseHooker() {
else result
}.sortedByDescending { it.lastUpdateTime }
.forEach { add(AppInfoBean(name = context.appNameOf(it.packageName), packageName = it.packageName)) }
}.apply { loggerD(msg = "Fetched installed packages list, size $size") }
}.apply { if (size <= 0) loggerW(msg = "Fetched installed packages but got empty list") }
}
} ?: arrayListOf()
}