Xiaomi beat Apple and Samsung