In LoadActivity.onCreate(), handleIntent(intent) is invoked on the main (UI) thread.
However, handleIntent() performs multiple blocking I/O operations, including:
getContentFromURI() → InputStream.read() on content URIs
extractPreferencesFromUri() → FileInputStream, BufferedReader.readLine()
Because all of these operations are performed synchronously on the UI thread, they can cause:
noticeable UI freezes
ANR when loading large config files
degraded user experience during app startup
Why this is a problem
Android guidelines recommend moving any file I/O off the main thread.
Running these in onCreate() further increases the risk of UI jank.
In LoadActivity.onCreate(), handleIntent(intent) is invoked on the main (UI) thread.
However, handleIntent() performs multiple blocking I/O operations, including:
getContentFromURI() → InputStream.read() on content URIs
extractPreferencesFromUri() → FileInputStream, BufferedReader.readLine()
Because all of these operations are performed synchronously on the UI thread, they can cause:
noticeable UI freezes
ANR when loading large config files
degraded user experience during app startup
Why this is a problem
Android guidelines recommend moving any file I/O off the main thread.
Running these in onCreate() further increases the risk of UI jank.