Skip to content

[Bug]: There are potential time-consuming operations on the UI thread. #5155

Description

@ab13431

Problem description

We used a static analysis tool to check whether termux-app performs any potentially time-consuming operations on the UI thread. Our analysis identified the following potential issues:

In RunCommandService.java, within the onStartCommand() method, the operation involves file I/O or SharedPreferences access, which can trigger disk reads or writes synchronously on the main thread. According to Android best practices, such operations should be moved off the UI thread and executed in a background thread or coroutine. A test case was generated (RunCommandService.onStartCommand.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.

We hope this report helps improve responsiveness and user experience.

What is the expected behavior?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions