Skip to content

[BUG] There are potential time-consuming operations on the UI thread. #1349

Description

@ab13431

Before you submit

  • I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
  • This issue contains only one bug.

What's going wrong?

Hello,

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

In Droidify.kt, within the onCreate() method, the API call forceSyncAll() involves a database query or write. SQL operations performed on the main thread can block when the dataset grows. According to Android best practices, such operations should be moved off the UI thread and executed in a background thread or coroutine.

In Droidify.kt, within the listenApplications() method, the operation involves a database query or write. SQL operations performed on the main thread can block when the dataset grows. According to Android best practices, such operations should be moved off the UI thread and executed in a background thread or coroutine.

We hope this report helps improve responsiveness and user experience.

How do we reproduce it?

No response

What did you expect?

No response

Screenshots

No response

Your phone

Pixel 9a

Android version

SDK 37

Droid-ify version

The code in the master branch

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions