There are potential time-consuming operations on the UI thread.

Author: ab13431Created Jun 16, 2026Updated Jun 16, 2026
Labelsbugos/android

Application

Outline Client

Describe the bug

Hello,

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

In QuickSettingsTileService.java, within the onClick() method, the API call setTunnelStatus() (via load → getTunnelStatus) 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 (VpnTunnelStore.getTunnelStatus.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.

In VpnServiceStarter.java, within the onReceive() method, the API call getTunnelStatus() 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 (VpnTunnelStore.getTunnelStatus.kt) but could not be fully compiled and verified in the sandbox environment — manual review is recommended.

We hope this report helps improve outline-apps's responsiveness and user experience.

Source: OutlineFoundation/outline-apps