@SteveBellovin Why such a complicated question at such an early hour?
I certainly do not know the answer, but a few thoughts did pop into my still groggy head...
First is precisely where did the search happen? For instance was it in one of those US immigration/customs stations that are physically at Canadian airports? Are those under any sort of treaty arrangement?
Second, if I remember correctly, didn't SCOTUS rule on the geographic extent of district court orders (i.e. to block orders that cover outside of the court's geographic bailiwick.)
Third is that we always seem to assume that phone searches are looking for data. I can imagine that when one is looking for explosives or drugs that a search could be to weigh the phone. And for data, what about cloud data (wherever that is) that is not on the phone and for which the phone is merely a portal?

The U.S. Court of Appeals for the Ninth Circuit issued a new ruling in U.S. v. Cano [.pdf] that offers greater privacy protection for people crossing the border with their electronic devices, but it doesn’t go as far as we sought in our amicus brief.Cano had attempted to cross the border near San...
@SteveBellovin IANAL, but it's not a question that's occurred to me. And I have a very thick tin-foil-hat, so that's embarrassing.
I pretty much stopped flying when TSA was invented (except for work), and resolved to never take electronics with me if I cross a border.
Since the SCOTUS ruled that I have no Constitutional rights withing 500 miles of any border, especially the 4A rights, I keep nothing of value on my phone anyway, since it's always at risk.