Apple to pay up to $500M over battery-related phone slowdown