Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/net/megaproxy487/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ private fun ConnectionStatsCard(stats: DisplayedConnectionStats) {
value = if (latency <= 0) "—" else stringResource(
R.string.latency_milliseconds,
latency.toInt(),
formatAge(ageMillis),
),
supportingValue = if (latency <= 0) null else formatAge(ageMillis).ifEmpty { null },
modifier = Modifier.weight(1f),
)
}
Expand Down
26 changes: 13 additions & 13 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,25 +227,25 @@
<string name="traffic_units_iec">Двоичные IEC (KiB, MiB, GiB · 1024)</string>
<string name="traffic_units_si">Десятичные SI (KB, MB, GB · 1000)</string>
<string name="proxy_latency">Задержка прокси</string>
<string name="latency_milliseconds">%1$d мс%2$s</string>
<string name="latency_milliseconds">%1$d мс</string>
<string name="connection_errors_no_samples">Ошибки соединения: нет данных</string>
<string name="connection_errors">Ошибки соединения: %1$.1f%% · %2$s</string>
<plurals name="connection_samples">
<item quantity="one">%1$d попытка</item>
<item quantity="few">%1$d попытки</item>
<item quantity="many">%1$d попыток</item>
<item quantity="other">%1$d попытки</item>
<item quantity="one">%1$d сэмпл</item>
<item quantity="few">%1$d сэмпла</item>
<item quantity="many">%1$d сэмплов</item>
<item quantity="other">%1$d сэмпла</item>
</plurals>
<plurals name="latency_seconds_ago">
<item quantity="one"> · %1$d секунду назад</item>
<item quantity="few"> · %1$d секунды назад</item>
<item quantity="many"> · %1$d секунд назад</item>
<item quantity="other"> · %1$d секунды назад</item>
<item quantity="one">%1$d секунду назад</item>
<item quantity="few">%1$d секунды назад</item>
<item quantity="many">%1$d секунд назад</item>
<item quantity="other">%1$d секунды назад</item>
</plurals>
<plurals name="latency_minutes_ago">
<item quantity="one"> · %1$d минуту назад</item>
<item quantity="few"> · %1$d минуты назад</item>
<item quantity="many"> · %1$d минут назад</item>
<item quantity="other"> · %1$d минуты назад</item>
<item quantity="one">%1$d минуту назад</item>
<item quantity="few">%1$d минуты назад</item>
<item quantity="many">%1$d минут назад</item>
<item quantity="other">%1$d минуты назад</item>
</plurals>
</resources>
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,19 +228,19 @@
<string name="traffic_units_iec">IEC binary (KiB, MiB, GiB · 1024)</string>
<string name="traffic_units_si">SI decimal (KB, MB, GB · 1000)</string>
<string name="proxy_latency">Proxy latency</string>
<string name="latency_milliseconds">%1$d ms%2$s</string>
<string name="latency_milliseconds">%1$d ms</string>
<string name="connection_errors_no_samples">Connection errors: no samples</string>
<string name="connection_errors">Connection errors: %1$.1f%% · %2$s</string>
<plurals name="connection_samples">
<item quantity="one">%1$d sample</item>
<item quantity="other">%1$d samples</item>
</plurals>
<plurals name="latency_seconds_ago">
<item quantity="one"> · %1$d sec ago</item>
<item quantity="other"> · %1$d sec ago</item>
<item quantity="one">%1$d sec ago</item>
<item quantity="other">%1$d sec ago</item>
</plurals>
<plurals name="latency_minutes_ago">
<item quantity="one"> · %1$d min ago</item>
<item quantity="other"> · %1$d min ago</item>
<item quantity="one">%1$d min ago</item>
<item quantity="other">%1$d min ago</item>
</plurals>
</resources>
32 changes: 28 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,35 @@ platform :android do
desc "Run instrumented Compose UI tests on a connected Android device or emulator"
lane :ui_tests do
native_library
gradle(
task: "connectedDebugAndroidTest",
flags: "--no-daemon",
project_dir: project_root
report_pattern = File.join(
project_root,
"app/build/outputs/androidTest-results/connected/debug/TEST-*.xml"
)
Dir.glob(report_pattern).each { |report| File.delete(report) }
attempts = 0
begin
attempts += 1
gradle(
task: "connectedDebugAndroidTest",
flags: "--no-daemon",
project_dir: project_root
)
rescue
reports = Dir.glob(report_pattern)
executed_tests = reports.sum do |report|
(File.read(report).match(/tests="(\d+)"/)&.captures&.first || "0").to_i
end

# A software-emulated Android process can occasionally die before the
# instrumentation runner starts. Retry that infrastructure failure once,
# but never hide an assertion failure from a test that actually ran.
raise if attempts >= 2 || reports.empty? || executed_tests.positive?

UI.important("Instrumentation exited before running a test; retrying once")
reports.each { |report| File.delete(report) }
sh("adb wait-for-device")
retry
end
end

desc "Run every native and Android test and check"
Expand Down