From 2c7a38542c4f1909018eca734f6231b11d45a223 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 14 May 2022 21:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/utils/ContextExtensions.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt index 4f0de7360..94e35680c 100644 --- a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt @@ -331,6 +331,7 @@ fun Context.openFileUri(uri: Uri, type: String? = null) { @Suppress("DEPRECATION") val Context.isWifiConnect: Boolean + @SuppressLint("MissingPermission") get() { val info = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI) return info?.isConnected == true @@ -338,7 +339,7 @@ val Context.isWifiConnect: Boolean val Context.isPad: Boolean get() { - return resources.configuration.screenLayout and Configuration.SCREENLAYOUT_SIZE_MASK >= Configuration.SCREENLAYOUT_SIZE_LARGE + return (resources.configuration.screenLayout and Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE } val Context.channel: String