Merge "Handle uid state changes on the handler thread." into main