In TermuxCreateShortcutActivity.java, the method updateListview(File directory) synchronously calls directory.listFiles(ShortcutUtils.SHORTCUT_FILES_FILTER) on the UI thread. While this may not cause noticeable issues in small-scale use cases, it can block the UI thread when handling a large number of files. According to Android best practices, file I/O operations should not be performed on the UI thread, as this can lead to UI freezes. It is recommended to move this operation to a background thread to avoid blocking the UI and improve app responsiveness.
In TermuxCreateShortcutActivity.java, the method updateListview(File directory) synchronously calls directory.listFiles(ShortcutUtils.SHORTCUT_FILES_FILTER) on the UI thread. While this may not cause noticeable issues in small-scale use cases, it can block the UI thread when handling a large number of files. According to Android best practices, file I/O operations should not be performed on the UI thread, as this can lead to UI freezes. It is recommended to move this operation to a background thread to avoid blocking the UI and improve app responsiveness.