Fix some compile warnings

upper case and lower case
This commit is contained in:
yuhan6665
2021-07-30 18:31:29 -04:00
parent f7d534fc00
commit c7c6564624
4 changed files with 7 additions and 7 deletions
@@ -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()))
@@ -75,7 +75,7 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter<Mai
} else if (config.configType == EConfigType.VLESS) {
holder.itemMainBinding.tvType.text = config.configType.name
} else {
holder.itemMainBinding.tvType.text = config.configType.name.toLowerCase()
holder.itemMainBinding.tvType.text = config.configType.name.lowercase()
}
holder.itemMainBinding.tvStatistics.text = "${outbound?.getServerAddress()} : ${outbound?.getServerPort()}"
@@ -158,7 +158,7 @@ class PerAppProxyActivity : BaseActivity() {
var imm: InputMethodManager = v.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS)
val key = v.text.toString().toUpperCase()
val key = v.text.toString().uppercase()
val apps = ArrayList<AppInfo>()
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)
}
}
@@ -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)
}