The same is true at any border crossing - you have to submit to searches by CBP agents, who don't need any probable cause. I believe device searches are still a somewhat greyer area, at least if password protected (as providing a password would be compelled speech, unlike a luggage search which can be conducted without any action from your part).
in autistic-land, doesn't it seem like the power to perform searches by border police should be directed related and limited to their function - that is the inspection of material goods to insure that (a) illegal smuggling isn't taking place and (b) the proper import taxes have been paid.
unless the phone itself is a suspicious good, there should never be any justification for a border officer to demand visibility of the contents of the phone, or the data that its permitted to access on other systems.
I presume the counter to this is that they must be able to examine the socials in order to see if you should 'death to america' on message boards. is that really an important vector? is the balance of that security concern versus speech rights (which are supposed to be 'universal') something we want individual field officers to decide?
>as providing a password would be compelled speech
which is a good reminder for anyone with reason to be concerned about this sort of thing to turn off biometric/face id/etc. access to their devices.