(Bloomberg) -- Xiaomi Corp. posted its first revenue gain in almost two years, a welcome boost for a smartphone maker that’s begun aggressively attacking its Chinese rivals with higher-end models at home and abroad.Most Read from BloombergThe Doomed Mission Behind Sam Altman's Shock Ouster From OpenAIMicrosoft Ends Weekend of OpenAI Drama With Coup of Its OwnOpenAI Leaders' Efforts to Bring Back Altman Reach Impasse Over Board RoleOpenAI’s Murati Aims to Re-Hire Altman, Brockman After ExitsOpenA