They searched the phone before obtaining a warrant. This ruling is troubling not because of the case at hand, but because of the precedent it sets. It's definitely an area where the law could be better defined.
However, in South Dakota v. Opperman (http://supreme.justia.com/us/428/364/case.html) the court upheld that police may search and inventory a car without a warrant, even though the car was impounded for parking violations and not on suspicion of drug offenses (as it turned out was the case). I would conclude, therefore, that a car impounded during an arrest can definitely be searched.