File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed
app/src/main/java/com/itsaky/androidide
idetooltips/src/main/java/com/itsaky/androidide/idetooltips
subprojects/javac-services/src/main/java/com/itsaky/androidide/javac/services/fs Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import com.itsaky.androidide.R
2323import com.itsaky.androidide.actions.ActionData
2424import com.itsaky.androidide.actions.EditorActivityAction
2525import com.itsaky.androidide.actions.markInvisible
26+ import com.itsaky.androidide.idetooltips.TooltipTag
2627import com.itsaky.androidide.services.log.lookupLogService
2728
2829/* *
@@ -33,6 +34,7 @@ import com.itsaky.androidide.services.log.lookupLogService
3334class 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)
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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()
You can’t perform that action at this time.
0 commit comments