From 0d2f8e294520b1ea965749391075fd97f3554248 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 2 Mar 2023 22:46:11 -0500 Subject: [PATCH] Initial support for Android 14 DP1 --- mobile/build.gradle.kts | 2 +- .../vpnhotspot/net/wifi/WifiApDialogFragment.kt | 13 ++++++++++--- mobile/src/main/res/menu/toolbar_configuration.xml | 10 +++++++++- mobile/src/main/res/values-zh-rCN/strings.xml | 1 + mobile/src/main/res/values/strings.xml | 1 + 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index eede36a7..a8d5b21e 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -19,7 +19,7 @@ android { targetCompatibility(javaVersion) } kotlin.jvmToolchain(javaVersion) - compileSdk = 33 + compileSdkPreview = "UpsideDownCake" defaultConfig { applicationId = "be.mygod.vpnhotspot" minSdk = 28 diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt index cbb249c9..61108ae0 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt @@ -22,6 +22,7 @@ import android.widget.Toast import androidx.annotation.RequiresApi import androidx.appcompat.app.AlertDialog import androidx.appcompat.widget.Toolbar +import androidx.core.os.BuildCompat import androidx.core.os.persistableBundleOf import androidx.core.view.isGone import be.mygod.librootkotlinx.toByteArray @@ -34,6 +35,7 @@ import be.mygod.vpnhotspot.databinding.DialogWifiApBinding import be.mygod.vpnhotspot.net.monitor.TetherTimeoutMonitor import be.mygod.vpnhotspot.util.QRCodeDialog import be.mygod.vpnhotspot.util.RangeInput +import be.mygod.vpnhotspot.util.Services import be.mygod.vpnhotspot.util.readableMessage import be.mygod.vpnhotspot.util.showAllowingStateLoss import com.google.android.material.textfield.TextInputLayout @@ -512,9 +514,14 @@ class WifiApDialogFragment : AlertDialogFragment + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> + 权限不足 设置 WLAN + 配置可能无效 使用 QR 码分享 Android 系统拒绝使用此配置。(详情参见日志) "网络名称" diff --git a/mobile/src/main/res/values/strings.xml b/mobile/src/main/res/values/strings.xml index 842561b4..57c41905 100644 --- a/mobile/src/main/res/values/strings.xml +++ b/mobile/src/main/res/values/strings.xml @@ -199,6 +199,7 @@ Permission missing Wi\u2011Fi configuration + Possibly invalid configuration Share via QR code Android system refuses such configuration. (see logcat) Network name