diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt index 977be96f..db89c946 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt @@ -21,7 +21,7 @@ data class ServerConfig( return ServerConfig( configType = configType, outboundBean = V2rayConfig.OutboundBean( - protocol = configType.name.toLowerCase(), + protocol = configType.name.lowercase(), settings = V2rayConfig.OutboundBean.OutSettingsBean( vnext = listOf(V2rayConfig.OutboundBean.OutSettingsBean.VnextBean( users = listOf(V2rayConfig.OutboundBean.OutSettingsBean.VnextBean.UsersBean())))), @@ -32,7 +32,7 @@ data class ServerConfig( return ServerConfig( configType = configType, outboundBean = V2rayConfig.OutboundBean( - protocol = configType.name.toLowerCase(), + protocol = configType.name.lowercase(), settings = V2rayConfig.OutboundBean.OutSettingsBean( servers = listOf(V2rayConfig.OutboundBean.OutSettingsBean.ServersBean())), streamSettings = V2rayConfig.OutboundBean.StreamSettingsBean())) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt index 5538c695..66c7a183 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt @@ -75,7 +75,7 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter() if (TextUtils.isEmpty(key)) { appsAll?.forEach { @@ -166,7 +166,7 @@ class PerAppProxyActivity : BaseActivity() { } } else { appsAll?.forEach { - if (it.appName.toUpperCase().indexOf(key) >= 0) { + if (it.appName.uppercase().indexOf(key) >= 0) { apps.add(it) } } diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AngConfigManager.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AngConfigManager.kt index 0ee7e793..0ebda81a 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AngConfigManager.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AngConfigManager.kt @@ -245,7 +245,7 @@ object AngConfigManager { server.address = match.groupValues[3].removeSurrounding("[", "]") server.port = match.groupValues[4].toInt() server.password = match.groupValues[2] - server.method = match.groupValues[1].toLowerCase() + server.method = match.groupValues[1].lowercase() } } else if (str.startsWith(EConfigType.SOCKS.protocolScheme)) { var result = str.replace(EConfigType.SOCKS.protocolScheme, "") @@ -276,7 +276,7 @@ object AngConfigManager { server.address = match.groupValues[3].removeSurrounding("[", "]") server.port = match.groupValues[4].toInt() val socksUsersBean = V2rayConfig.OutboundBean.OutSettingsBean.ServersBean.SocksUsersBean() - socksUsersBean.user = match.groupValues[1].toLowerCase() + socksUsersBean.user = match.groupValues[1].lowercase() socksUsersBean.pass = match.groupValues[2] server.users = listOf(socksUsersBean) }