The San Jose federal judge presiding over Apple Inc.’s smartphone patent battle with Samsung Electronics Co. rejected posttrial motions from both sides on Friday, preserving Apple’s $290 million damages award in the companies’ damages retrial last year.

But the judge also delivered a stern rebuke to Apple’s lawyers for seemingly appealing to nationalism and xenophobia in making their case against a Korean rival, warning that efforts to play to juror prejudices won’t be tolerated.