From 8152191277ca0fb740a051e99c482c9b90c65a8b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 12 Apr 2023 13:48:55 +0200 Subject: ui: further reduce log viewer memory usage Signed-off-by: Jason A. Donenfeld --- ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/src/main/java/com/wireguard') diff --git a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt index acb2cd21..36925bea 100644 --- a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt @@ -158,7 +158,6 @@ class LogViewerActivity : AppCompatActivity() { builder.append('\n') } val ret = builder.toString().toByteArray(Charsets.UTF_8) - builder.clear() return ret } @@ -203,7 +202,7 @@ class LogViewerActivity : AppCompatActivity() { var priorModified = false val bufferedLogLines = arrayListOf() var timeout = 1000000000L / 2 // The timeout is initially small so that the view gets populated immediately. - val MAX_LINES = (1 shl 17) - 1 + val MAX_LINES = (1 shl 16) - 1 val MAX_BUFFERED_LINES = (1 shl 14) - 1 while (true) { -- cgit v1.2.3