Selling smartphones used to be easy—everyone wanted one, and every new phone was a lot better than the one that came before.