diff --git a/app/src/main/java/cc/ioctl/hook/ui/misc/ChangeDpi.kt b/app/src/main/java/cc/ioctl/hook/ui/misc/ChangeDpi.kt index ebf50a3926..d0a006a4da 100644 --- a/app/src/main/java/cc/ioctl/hook/ui/misc/ChangeDpi.kt +++ b/app/src/main/java/cc/ioctl/hook/ui/misc/ChangeDpi.kt @@ -148,6 +148,9 @@ object ChangeDpi : CommonConfigFunctionHook() { var targetDpi: Int get() { val file = File(hostInfo.application.filesDir, KEY_TARGET_DPI) + if (!file.exists()) { + return 0; + } try { // read exact 4 bytes, little endian FileInputStream(file).use {