9 Commits

25 changed files with 176 additions and 264 deletions
-1
View File
@@ -138,7 +138,6 @@ jobs:
exit 1
fi
chmod 755 gradlew
./gradlew licenseFdroidReleaseReport
./gradlew assembleRelease --info 2>&1 | grep -i "signing\|keystore" || true
- name: Upload arm64-v8a APK
+23 -52
View File
@@ -1,7 +1,5 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("com.jaredsburrows.license")
}
android {
@@ -18,8 +16,6 @@ android {
versionCode = envVersionCode?.toIntOrNull() ?: 717
versionName = envVersionName ?: "2.0.17"
multiDexEnabled = true
val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';')
splits {
@@ -90,7 +86,7 @@ android {
sourceSets {
getByName("main") {
jniLibs.srcDirs("libs")
jniLibs.directories.add("libs")
}
}
@@ -106,50 +102,6 @@ android {
}
}
applicationVariants.all {
val variant = this
val isFdroid = variant.productFlavors.any { it.name == "fdroid" }
if (isFdroid) {
val versionCodes =
mapOf(
"armeabi-v7a" to 2, "arm64-v8a" to 1, "x86" to 4, "x86_64" to 3, "universal" to 0
)
variant.outputs
.map { it as com.android.build.gradle.internal.api.ApkVariantOutputImpl }
.forEach { output ->
val abi = output.getFilter("ABI") ?: "universal"
output.outputFileName = "v2rayNG_${variant.versionName}-fdroid_${abi}.apk"
if (versionCodes.containsKey(abi)) {
output.versionCodeOverride =
(100 * variant.versionCode + versionCodes[abi]!!).plus(5000000)
} else {
return@forEach
}
}
} else {
val versionCodes =
mapOf("armeabi-v7a" to 4, "arm64-v8a" to 4, "x86" to 4, "x86_64" to 4, "universal" to 4)
variant.outputs
.map { it as com.android.build.gradle.internal.api.ApkVariantOutputImpl }
.forEach { output ->
val abi = if (output.getFilter("ABI") != null)
output.getFilter("ABI")
else
"universal"
output.outputFileName = "v2rayNG_${variant.versionName}_${abi}.apk"
if (versionCodes.containsKey(abi)) {
output.versionCodeOverride =
(1000000 * versionCodes[abi]!!).plus(variant.versionCode)
} else {
return@forEach
}
}
}
}
buildFeatures {
viewBinding = true
buildConfig = true
@@ -163,6 +115,28 @@ android {
}
androidComponents {
onVariants { variant ->
val isFdroid = variant.productFlavors.any { it.second == "fdroid" }
variant.outputs.forEach { output ->
val abi = output.filters.find {
it.filterType == com.android.build.api.variant.FilterConfiguration.FilterType.ABI
}?.identifier ?: "universal"
if (isFdroid) {
val versionCodes = mapOf(
"armeabi-v7a" to 2, "arm64-v8a" to 1, "x86" to 4, "x86_64" to 3, "universal" to 0
)
versionCodes[abi]?.let { code ->
output.versionCode.set((100 * (output.versionCode.get() ?: 0) + code) + 5000000)
}
} else {
output.versionCode.set(1000000 * 4 + (output.versionCode.get() ?: 0))
}
}
}
}
dependencies {
// Core Libraries
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar", "*.jar"))))
@@ -210,9 +184,6 @@ dependencies {
implementation(libs.work.runtime.ktx)
implementation(libs.work.multiprocess)
// Multidex Support
implementation(libs.multidex)
// Testing Libraries
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
@@ -1,7 +1,7 @@
package xyz.zarazaex.olc
import android.app.Application
import android.content.Context
import androidx.multidex.MultiDexApplication
import androidx.work.Configuration
import androidx.work.WorkManager
import com.google.android.material.color.DynamicColors
@@ -9,7 +9,7 @@ import com.tencent.mmkv.MMKV
import xyz.zarazaex.olc.AppConfig.ANG_PACKAGE
import xyz.zarazaex.olc.handler.SettingsManager
class AngApplication : MultiDexApplication() {
class AngApplication : Application() {
companion object {
lateinit var application: AngApplication
}
@@ -72,7 +72,6 @@ object AppConfig {
const val PREF_USE_HEV_TUNNEL = "pref_use_hev_tunnel_v2"
const val PREF_HEV_TUNNEL_LOGLEVEL = "pref_hev_tunnel_loglevel"
const val PREF_HEV_TUNNEL_RW_TIMEOUT = "pref_hev_tunnel_rw_timeout_v2"
const val PREF_AUTO_REMOVE_INVALID_AFTER_TEST = "pref_auto_remove_invalid_after_test"
const val PREF_AUTO_SORT_AFTER_TEST = "pref_auto_sort_after_test"
/** Cache keys. */
@@ -292,34 +292,6 @@ object MmkvManager {
return count
}
/**
* Removes invalid server configurations.
*
* @param guid The server GUID.
* @return The number of server configurations removed.
*/
fun removeInvalidServer(guid: String): Int {
var count = 0
if (guid.isNotEmpty()) {
decodeServerAffiliationInfo(guid)?.let { aff ->
if (aff.testDelayMillis < 0L) {
removeServer(guid)
count++
}
}
} else {
serverAffStorage.allKeys()?.forEach { key ->
decodeServerAffiliationInfo(key)?.let { aff ->
if (aff.testDelayMillis < 0L) {
removeServer(key)
count++
}
}
}
}
return count
}
/**
* Encodes the raw server configuration.
*
@@ -17,47 +17,55 @@ import java.io.FileOutputStream
object UpdateCheckerManager {
suspend fun checkForUpdate(includePreRelease: Boolean = false): CheckUpdateResult = withContext(Dispatchers.IO) {
val url = if (includePreRelease) {
AppConfig.APP_API_URL
} else {
AppConfig.APP_API_URL.concatUrl("latest")
}
try {
val url = if (includePreRelease) {
AppConfig.APP_API_URL
} else {
AppConfig.APP_API_URL.concatUrl("latest")
}
var response = HttpUtil.getUrlContent(url, 5000)
if (response.isNullOrEmpty()) {
val httpPort = SettingsManager.getHttpPort()
response = HttpUtil.getUrlContent(url, 5000, httpPort)
?: throw IllegalStateException("Failed to get response")
}
var response = HttpUtil.getUrlContent(url, 5000)
if (response.isNullOrEmpty()) {
val httpPort = SettingsManager.getHttpPort()
response = HttpUtil.getUrlContent(url, 5000, httpPort)
?: throw IllegalStateException("Failed to get response")
}
val latestRelease = if (includePreRelease) {
JsonUtil.fromJson(response, Array<GitHubRelease>::class.java)
?.firstOrNull()
?: throw IllegalStateException("No pre-release found")
} else {
JsonUtil.fromJson(response, GitHubRelease::class.java)
}
if (latestRelease == null) {
return@withContext CheckUpdateResult(hasUpdate = false)
}
val latestRelease = if (includePreRelease) {
JsonUtil.fromJson(response, Array<GitHubRelease>::class.java)
?.firstOrNull()
?: throw IllegalStateException("No pre-release found")
} else {
JsonUtil.fromJson(response, GitHubRelease::class.java)
}
if (latestRelease == null) {
return@withContext CheckUpdateResult(hasUpdate = false)
}
val latestVersion = latestRelease.tagName.removePrefix("v")
Log.i(
AppConfig.TAG,
"Found new version: $latestVersion (current: ${BuildConfig.VERSION_NAME})"
)
return@withContext if (compareVersions(latestVersion, BuildConfig.VERSION_NAME) > 0) {
val downloadUrl = getDownloadUrl(latestRelease, Build.SUPPORTED_ABIS[0])
CheckUpdateResult(
hasUpdate = true,
latestVersion = latestVersion,
releaseNotes = latestRelease.body,
downloadUrl = downloadUrl,
isPreRelease = latestRelease.prerelease
val latestVersion = latestRelease.tagName.removePrefix("v")
Log.i(
AppConfig.TAG,
"Found new version: $latestVersion (current: ${BuildConfig.VERSION_NAME})"
)
} else {
CheckUpdateResult(hasUpdate = false)
return@withContext if (compareVersions(latestVersion, BuildConfig.VERSION_NAME) > 0) {
val downloadUrl = getDownloadUrl(latestRelease, Build.SUPPORTED_ABIS[0])
CheckUpdateResult(
hasUpdate = true,
latestVersion = latestVersion,
releaseNotes = latestRelease.body,
downloadUrl = downloadUrl,
isPreRelease = latestRelease.prerelease
)
} else {
CheckUpdateResult(hasUpdate = false)
}
} catch (e: NumberFormatException) {
Log.e(AppConfig.TAG, "Failed to parse version: ${e.message}")
return@withContext CheckUpdateResult(hasUpdate = false)
} catch (e: Exception) {
Log.e(AppConfig.TAG, "Failed to check for update: ${e.message}")
throw e
}
}
@@ -95,12 +103,15 @@ object UpdateCheckerManager {
}
private fun compareVersions(version1: String, version2: String): Int {
val v1 = version1.split(".")
val v2 = version2.split(".")
val cleanVersion1 = version1.split("-")[0]
val cleanVersion2 = version2.split("-")[0]
val v1 = cleanVersion1.split(".")
val v2 = cleanVersion2.split(".")
for (i in 0 until maxOf(v1.size, v2.size)) {
val num1 = if (i < v1.size) v1[i].toInt() else 0
val num2 = if (i < v2.size) v2[i].toInt() else 0
val num1 = if (i < v1.size) v1[i].toIntOrNull() ?: 0 else 0
val num2 = if (i < v2.size) v2[i].toIntOrNull() ?: 0 else 0
if (num1 != num2) return num1 - num2
}
return 0
@@ -87,26 +87,8 @@ object V2RayServiceManager {
* @param context The context from which the service is stopped.
*/
fun stopVService(context: Context) {
synchronized(operationLock) {
if (isOperationInProgress) {
Log.w(AppConfig.TAG, "StartCore-Manager: Operation already in progress")
return
}
isOperationInProgress = true
}
try {
if (serviceControl?.get() == null) {
Log.w(AppConfig.TAG, "StartCore-Manager: Service not running, resetting UI state")
MessageUtil.sendMsg2UI(context, AppConfig.MSG_STATE_STOP_SUCCESS, "")
return
}
MessageUtil.sendMsg2Service(context, AppConfig.MSG_STATE_STOP, "")
} finally {
synchronized(operationLock) {
isOperationInProgress = false
}
}
Log.i(AppConfig.TAG, "StartCore-Manager: stopVService called, serviceControl=${serviceControl?.get()}")
MessageUtil.sendMsg2Service(context, AppConfig.MSG_STATE_STOP, "")
}
/**
@@ -262,23 +244,26 @@ object V2RayServiceManager {
fun stopCoreLoop(): Boolean {
val service = getService() ?: return false
try {
service.unregisterReceiver(mMsgReceive)
} catch (e: Exception) {
Log.e(AppConfig.TAG, "StartCore-Manager: Failed to unregister receiver", e)
}
NotificationManager.cancelNotification()
if (coreController.isRunning) {
CoroutineScope(Dispatchers.IO).launch {
try {
coreController.stopLoop()
} catch (e: Exception) {
Log.e(AppConfig.TAG, "StartCore-Manager: Failed to stop V2Ray loop", e)
} finally {
MessageUtil.sendMsg2UI(service, AppConfig.MSG_STATE_STOP_SUCCESS, "")
}
}
}
MessageUtil.sendMsg2UI(service, AppConfig.MSG_STATE_STOP_SUCCESS, "")
NotificationManager.cancelNotification()
try {
service.unregisterReceiver(mMsgReceive)
} catch (e: Exception) {
Log.e(AppConfig.TAG, "StartCore-Manager: Failed to unregister receiver", e)
} else {
MessageUtil.sendMsg2UI(service, AppConfig.MSG_STATE_STOP_SUCCESS, "")
}
return true
@@ -399,22 +384,20 @@ object V2RayServiceManager {
* @param intent The intent being received.
*/
override fun onReceive(ctx: Context?, intent: Intent?) {
val serviceControl = serviceControl?.get() ?: return
when (intent?.getIntExtra("key", 0)) {
AppConfig.MSG_REGISTER_CLIENT -> {
val svc = serviceControl?.get() ?: return
if (coreController.isRunning) {
MessageUtil.sendMsg2UI(serviceControl.getService(), AppConfig.MSG_STATE_RUNNING, "")
MessageUtil.sendMsg2UI(svc.getService(), AppConfig.MSG_STATE_RUNNING, "")
} else {
MessageUtil.sendMsg2UI(serviceControl.getService(), AppConfig.MSG_STATE_NOT_RUNNING, "")
MessageUtil.sendMsg2UI(svc.getService(), AppConfig.MSG_STATE_NOT_RUNNING, "")
}
}
AppConfig.MSG_UNREGISTER_CLIENT -> {
// nothing to do
}
AppConfig.MSG_STATE_START -> {
// nothing to do
}
AppConfig.MSG_STATE_STOP -> {
@@ -422,7 +405,15 @@ object V2RayServiceManager {
synchronized(operationLock) {
isOperationInProgress = false
}
serviceControl.stopService()
val svc = serviceControl?.get()
if (svc != null) {
svc.stopService()
} else if (ctx != null) {
Log.w(AppConfig.TAG, "StartCore-Manager: serviceControl null on stop, stopping core directly")
stopCoreLoop()
ctx.stopService(Intent(ctx, V2RayVpnService::class.java))
ctx.stopService(Intent(ctx, V2RayProxyOnlyService::class.java))
}
}
AppConfig.MSG_STATE_RESTART -> {
@@ -430,9 +421,9 @@ object V2RayServiceManager {
synchronized(operationLock) {
isOperationInProgress = false
}
serviceControl.stopService()
serviceControl?.get()?.stopService()
Thread.sleep(500L)
startVService(serviceControl.getService())
if (ctx != null) startVService(ctx)
}
AppConfig.MSG_MEASURE_DELAY -> {
@@ -13,6 +13,7 @@ import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.withTimeout
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicInteger
@@ -75,13 +76,51 @@ class RealPingWorkerService(
}
}
private fun startRealPing(guid: String): Long {
private suspend fun startRealPing(guid: String): Long {
val retFailure = -1L
val configResult = V2rayConfigManager.getV2rayConfig4Speedtest(context, guid)
if (!configResult.status) {
return retFailure
}
return V2RayNativeManager.measureOutboundDelay(configResult.content, SettingsManager.getDelayTestUrl())
var bestDelay = retFailure
for (attempt in 0 until 2) {
try {
val delay = withTimeout(10000L) {
V2RayNativeManager.measureOutboundDelay(
configResult.content,
SettingsManager.getDelayTestUrl()
)
}
if (delay > 0 && (bestDelay == retFailure || delay < bestDelay)) {
bestDelay = delay
}
if (bestDelay > 0) {
break
}
} catch (e: Exception) {
if (attempt == 0) {
try {
val delay = withTimeout(10000L) {
V2RayNativeManager.measureOutboundDelay(
configResult.content,
SettingsManager.getDelayTestUrl(true)
)
}
if (delay > 0 && (bestDelay == retFailure || delay < bestDelay)) {
bestDelay = delay
}
} catch (_: Exception) {
}
}
}
}
return bestDelay
}
}
@@ -210,12 +210,16 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
lifecycleScope.launch {
try {
if (mainViewModel.isRunning.value == true) {
Log.d(AppConfig.TAG, "FAB: stopping service, isRunning=${mainViewModel.isRunning.value}")
V2RayServiceManager.stopVService(this@MainActivity)
} else {
Log.d(AppConfig.TAG, "FAB: starting service, isRunning=${mainViewModel.isRunning.value}")
startV2RayWithPermission()
}
} catch (e: Exception) {
Log.e(AppConfig.TAG, "FAB: error", e)
applyRunningState(isLoading = false, isRunning = mainViewModel.isRunning.value ?: false)
} finally {
delay(1000)
isFabOperationInProgress = false
}
}
@@ -264,8 +268,10 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
mainViewModel.testAllRealPing()
}
}
delay(1500)
} catch (e: Exception) {
Log.e(AppConfig.TAG, "Error in handleLiteAction", e)
} finally {
delay(1000)
isFabOperationInProgress = false
}
}
@@ -302,11 +308,13 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
try {
if (mainViewModel.isRunning.value == true) {
V2RayServiceManager.stopVService(this@MainActivity)
delay(1000)
}
delay(1000)
startV2Ray()
delay(1000)
} catch (e: Exception) {
Log.e(AppConfig.TAG, "Error in restartV2Ray", e)
} finally {
delay(500)
isFabOperationInProgress = false
}
}
@@ -557,25 +565,6 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
.show()
}
private fun delInvalidConfig() {
AlertDialog.Builder(this).setMessage(R.string.del_invalid_config_comfirm)
.setPositiveButton(android.R.string.ok) { _, _ ->
showLoading()
lifecycleScope.launch(Dispatchers.IO) {
val ret = mainViewModel.removeInvalidServer()
launch(Dispatchers.Main) {
mainViewModel.reloadServerList()
showStatus(getString(R.string.title_del_config_count, ret))
hideLoading()
}
}
}
.setNegativeButton(android.R.string.cancel) { _, _ ->
//do noting
}
.show()
}
private fun sortByTestResults() {
showLoading()
lifecycleScope.launch(Dispatchers.IO) {
@@ -445,23 +445,6 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
return count
}
/**
* Removes invalid servers.
* @return The number of removed servers.
*/
fun removeInvalidServer(): Int {
var count = 0
if (subscriptionId.isEmpty() && keywordFilter.isEmpty()) {
count += MmkvManager.removeInvalidServer("")
} else {
val serversCopy = serversCache.toList()
for (item in serversCopy) {
count += MmkvManager.removeInvalidServer(item.guid)
}
}
return count
}
/**
* Sorts servers by their test results.
*/
@@ -580,10 +563,6 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
fun onTestsFinished() {
viewModelScope.launch(Dispatchers.Default) {
if (MmkvManager.decodeSettingsBool(AppConfig.PREF_AUTO_REMOVE_INVALID_AFTER_TEST)) {
removeInvalidServer()
}
if (MmkvManager.decodeSettingsBool(AppConfig.PREF_AUTO_SORT_AFTER_TEST, true)) {
sortByTestResults()
}
@@ -156,8 +156,6 @@
<string name="title_pref_is_booted">Auto connect at startup</string>
<string name="summary_pref_is_booted">Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string name="title_pref_auto_remove_invalid_after_test">Auto delete invalid config after testing</string>
<string name="summary_pref_auto_remove_invalid_after_test">Test results may not be accurate; deleted config cannot be recovered.</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
@@ -417,4 +415,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">جارٍ التحديث…</string>
</resources>
@@ -154,8 +154,6 @@
<string name="title_pref_is_booted">Auto connect at startup</string>
<string name="summary_pref_is_booted">Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string name="title_pref_auto_remove_invalid_after_test">Auto delete invalid config after testing</string>
<string name="summary_pref_auto_remove_invalid_after_test">Test results may not be accurate; deleted config cannot be recovered.</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
@@ -423,4 +421,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">আপডেট হচ্ছে…</string>
</resources>
@@ -155,8 +155,6 @@
<string name="title_pref_is_booted">منپیز خوتکار مجال ره ونی</string>
<string name="summary_pref_is_booted">مجال ره وندن، خوساخوس و سرور پسند بیڌه منپیز ابۊ که گاشڌ نا مووفق بۊ.</string>
<string name="title_pref_auto_remove_invalid_after_test">پاک کردن خوتکار کانفیگ نا موئتبر بئڌ آزمایش</string>
<string name="summary_pref_auto_remove_invalid_after_test">نتیجه یل آزمایش گاشڌ دییق نبۊن؛ کانفیگ پاک وابیڌه ن نتری وورگنی.</string>
<string name="title_pref_auto_sort_after_test">ترتیب خوتکار بئڌ آزمایش</string>
<string name="summary_pref_auto_sort_after_test">نتیجه یل آزمایش گاشڌ دییق نبۊن؛</string>
@@ -433,4 +431,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">در حال به‌روزرسانی…</string>
</resources>
@@ -152,8 +152,6 @@
<string name="title_pref_is_booted">اتصال خودکار هنگام راه اندازی</string>
<string name="summary_pref_is_booted">هنگام راه اندازی به طور خودکار به سرور انتخابی متصل می شود که ممکن است ناموفق باشد.</string>
<string name="title_pref_auto_remove_invalid_after_test">Auto delete invalid config after testing</string>
<string name="summary_pref_auto_remove_invalid_after_test">Test results may not be accurate; deleted config cannot be recovered.</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
@@ -432,4 +430,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">در حال به‌روزرسانی…</string>
</resources>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_fab_active">@android:color/system_accent1_400</color>
<color name="color_fab_active">#90CAF9</color>
<color name="color_fab_inactive">#646464</color>
<color name="divider_color_light">#424242</color>
@@ -9,15 +9,15 @@
<color name="md_theme_primaryContainer">#474747</color>
<color name="md_theme_onPrimaryContainer">#E0E0E0</color>
<color name="md_theme_secondary">@android:color/system_accent1_400</color>
<color name="md_theme_secondary">#90CAF9</color>
<color name="md_theme_onSecondary">#FFFFFF</color>
<color name="md_theme_secondaryContainer">#6F3800</color>
<color name="md_theme_onSecondaryContainer">#FFE8D6</color>
<color name="md_theme_tertiary">@android:color/system_accent1_300</color>
<color name="md_theme_tertiary">#64B5F6</color>
<color name="md_theme_onTertiary">#00382E</color>
<color name="md_theme_tertiaryContainer">#005143</color>
<color name="md_theme_onTertiaryContainer">@android:color/system_accent1_200</color>
<color name="md_theme_onTertiaryContainer">#BBDEFB</color>
<!-- Error colors -->
<color name="md_theme_error">#FFB4AB</color>
@@ -156,8 +156,6 @@
<string name="title_pref_is_booted">Автоподключение при запуске</string>
<string name="summary_pref_is_booted">Автоматически подключаться к выбранному серверу при запуске приложения (может оказаться неудачным)</string>
<string name="title_pref_auto_remove_invalid_after_test">Автоудаление нерабочих профилей</string>
<string name="summary_pref_auto_remove_invalid_after_test">Автоматическое удаление нерабочих профилей после проверки (результаты проверки могут быть неточными; восстановить удалённые профили невозможно)</string>
<string name="title_pref_auto_sort_after_test">Автосортировка профилей</string>
<string name="summary_pref_auto_sort_after_test">Автоматическая сортировка профилей после проверки (результаты проверки могут быть неточными)</string>
@@ -153,8 +153,6 @@
<string name="title_pref_is_booted">Auto connect at startup</string>
<string name="summary_pref_is_booted">Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string name="title_pref_auto_remove_invalid_after_test">Auto delete invalid config after testing</string>
<string name="summary_pref_auto_remove_invalid_after_test">Test results may not be accurate; deleted config cannot be recovered.</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
@@ -419,4 +417,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">Đang cập nhật…</string>
</resources>
@@ -152,8 +152,6 @@
<string name="title_pref_is_booted">开机时自动连接</string>
<string name="summary_pref_is_booted">开机时自动连接选择的服务器,可能会不成功</string>
<string name="title_pref_auto_remove_invalid_after_test">测试后自动删除无效配置</string>
<string name="summary_pref_auto_remove_invalid_after_test">测试结果可能不准确;已删除的配置无法恢复。</string>
<string name="title_pref_auto_sort_after_test">测试后自动排序</string>
<string name="summary_pref_auto_sort_after_test">测试结果可能不准确;</string>
@@ -425,4 +423,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">更新中…</string>
</resources>
@@ -153,8 +153,6 @@
<string name="title_pref_is_booted">開機時自動連線</string>
<string name="summary_pref_is_booted">開機時自動連線選擇的伺服器,可能會不成功</string>
<string name="title_pref_auto_remove_invalid_after_test">測試後自動刪除無效配置</string>
<string name="summary_pref_auto_remove_invalid_after_test">測試結果可能不準確;已刪除的配置無法復原。 </string>
<string name="title_pref_auto_sort_after_test">測試後自動排序</string>
<string name="summary_pref_auto_sort_after_test">測試結果可能不準確;</string>
@@ -425,4 +423,5 @@
<item>WebDAV</item>
</string-array>
<string name="title_updating">更新中…</string>
</resources>
+6 -6
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPing">@android:color/system_accent1_600</color>
<color name="colorPing">#1565C0</color>
<color name="colorPingRed">#FF0099</color>
<color name="colorConfigType">@android:color/system_accent1_400</color>
<color name="colorConfigType">#1976D2</color>
<color name="colorWhite">#FFFFFF</color>
<color name="color_fab_active">@android:color/system_accent1_400</color>
<color name="color_fab_active">#1976D2</color>
<color name="color_fab_inactive">#9C9C9C</color>
<color name="divider_color_light">#E0E0E0</color>
<color name="colorIndicator">@color/md_theme_primary</color>
@@ -14,14 +14,14 @@
<color name="md_theme_primaryContainer">#E0E0E0</color>
<color name="md_theme_onPrimaryContainer">#000000</color>
<color name="md_theme_secondary">@android:color/system_accent1_400</color>
<color name="md_theme_secondary">#1976D2</color>
<color name="md_theme_onSecondary">#FFFFFF</color>
<color name="md_theme_secondaryContainer">#FFE8D6</color>
<color name="md_theme_onSecondaryContainer">#2B1700</color>
<color name="md_theme_tertiary">@android:color/system_accent1_600</color>
<color name="md_theme_tertiary">#1565C0</color>
<color name="md_theme_onTertiary">#FFFFFF</color>
<color name="md_theme_tertiaryContainer">@android:color/system_accent1_200</color>
<color name="md_theme_tertiaryContainer">#BBDEFB</color>
<color name="md_theme_onTertiaryContainer">#00201A</color>
<!-- Error colors -->
@@ -157,8 +157,6 @@
<string name="title_pref_is_booted">Auto connect at startup</string>
<string name="summary_pref_is_booted">Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string name="title_pref_auto_remove_invalid_after_test">Auto delete invalid config after testing</string>
<string name="summary_pref_auto_remove_invalid_after_test">Test results may not be accurate; deleted config cannot be recovered.</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
@@ -266,12 +266,6 @@
android:summary="@string/summary_pref_is_booted"
android:title="@string/title_pref_is_booted" />
<CheckBoxPreference
android:key="pref_auto_remove_invalid_after_test"
android:defaultValue="false"
android:summary="@string/summary_pref_auto_remove_invalid_after_test"
android:title="@string/title_pref_auto_remove_invalid_after_test" />
<CheckBoxPreference
android:key="pref_auto_sort_after_test"
android:defaultValue="false"
-8
View File
@@ -2,12 +2,4 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
}
buildscript {
dependencies {
classpath(libs.gradle.license.plugin)
}
}
+1 -14
View File
@@ -15,20 +15,7 @@ org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
kotlin.incremental=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=false
android.newDsl=false
android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false
BIN
View File
Binary file not shown.