Merge "Register callbacks on background thread to avoid ANR" into main