⠀
⠀
Describe the bug
We used a static analysis tool to check whether ytdlnis performs any potentially time-consuming operations on the UI thread. Our analysis identified the following potential issues:
In App.kt, within the onCreate() method, the API call setDefaultValues() 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 (App.onCreate.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.
In App.kt, within the setDefaultValues() 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 (App.setDefaultValues.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.
Expected behavior
No response
Screenshots / Recordings
No response
Additional context
No response
⠀
⠀
Describe the bug
We used a static analysis tool to check whether ytdlnis performs any potentially time-consuming operations on the UI thread. Our analysis identified the following potential issues:
In App.kt, within the onCreate() method, the API call setDefaultValues() 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 (
App.onCreate.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.In App.kt, within the setDefaultValues() 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 (
App.setDefaultValues.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.Expected behavior
No response
Screenshots / Recordings
No response
Additional context
No response