hotfix/cp-12672-anrs-on-app-start-cleverpushinit-does-database-and
Merged
UN
5h ago+136+136+012345678901234567890123456789-22-22-01234567890123456789
Fix main-thread disk access during SDK initialization
Summary by cubic
Moves SharedPreferences and database work off the main thread during SDK initialization to avoid ANRs on app start.
init()prepares and migrates SharedPreferences on a background executor, then resumes initialization on the main thread.- Retention cleanup runs on a dedicated database executor instead of the calling thread.
- Keeps the synchronous path when initialization starts off the main thread.