Smartphone sales have hovered in a rut for years, with global shipments often flat or down amid longer replacement cycles.