Merge "Use single queryDetailsForDevice if possible" into main