Apple ordered to pay $368 million in patent case