Skip to content

Commit 36965bd

Browse files
Merge branch 'stage' into ADFA-2878-detect-git-repo
2 parents 6293cbf + 1781511 commit 36965bd

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

app/src/main/java/com/itsaky/androidide/actions/etc/DisconnectLogSendersAction.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.itsaky.androidide.R
2323
import com.itsaky.androidide.actions.ActionData
2424
import com.itsaky.androidide.actions.EditorActivityAction
2525
import com.itsaky.androidide.actions.markInvisible
26+
import com.itsaky.androidide.idetooltips.TooltipTag
2627
import com.itsaky.androidide.services.log.lookupLogService
2728

2829
/**
@@ -33,6 +34,7 @@ import com.itsaky.androidide.services.log.lookupLogService
3334
class DisconnectLogSendersAction(context: Context, override val order: Int) : EditorActivityAction() {
3435

3536
override val id: String = "ide.editor.service.logreceiver.disconnectSenders"
37+
override fun retrieveTooltipTag(isReadOnlyContext: Boolean): String = TooltipTag.EDITOR_TOOLBAR_LOG_SENDER
3638

3739
init {
3840
label = context.getString(R.string.title_disconnect_log_senders)

app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,24 @@ class IDEApplication : BaseApplication() {
184184
thread: Thread,
185185
exception: Throwable,
186186
) {
187+
if (isNonFatalGcCleanupFailure(exception)) {
188+
logger.warn("Non-fatal: ZipFile GC cleanup failed with I/O error", exception)
189+
return
190+
}
191+
187192
if (isUserUnlocked) {
188-
// we can access credential protected storage, delegate the job to
189-
// to advanced crash handler
190193
CredentialProtectedApplicationLoader.handleUncaughtException(thread, exception)
191194
return
192195
}
193196

194-
// we can only access device-protected storage, and are not allowed
195-
// to show crash handler screen
196-
// delegate the job to the basic crash handler
197197
DeviceProtectedApplicationLoader.handleUncaughtException(thread, exception)
198198
}
199+
200+
private fun isNonFatalGcCleanupFailure(exception: Throwable): Boolean {
201+
if (exception !is java.io.UncheckedIOException) return false
202+
return exception.stackTrace.any {
203+
it.className.contains("CleanableResource") ||
204+
it.className.contains("PhantomCleanable")
205+
}
206+
}
199207
}

idetooltips/src/main/java/com/itsaky/androidide/idetooltips/TooltipTag.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ object TooltipTag {
9393
const val EDITOR_TOOLBAR_QUICK_SAVE = "project.save"
9494
const val EDITOR_TOOLBAR_PREVIEW_LAYOUT = "editor.layout.preview"
9595
const val EDITOR_TOOLBAR_COMPUTER_VISION = "project.layout.vision"
96+
const val EDITOR_TOOLBAR_LOG_SENDER = "editor.disconnect.logsenders"
9697

9798
// Delete project
9899
const val DELETE_PROJECT = "project.delete"

subprojects/javac-services/src/main/java/com/itsaky/androidide/javac/services/fs/CachedJarFileSystem.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CachedJarFileSystem(
4747
// This is called manually by the Java LSP
4848
}
4949

50+
@Throws(IOException::class)
5051
fun doClose() {
5152
try {
5253
super.close()

0 commit comments

Comments
 (0)