Because I was curious about this exact same question, I did some looking on this last night.
Case law on this seemingly requires some nexus to a border. In Almeida-Sanchez v US[0], a Mexican citizen was stopped while driving on an east-west road that was near the border but that didn't connect to the border. The marijuana that was found in his car was excluded because there was no proof he was actually crossing a border, just near it.
So I'd expect, under a functioning legal system, a warrant would be required to search your phone if you landed in JFK on a flight from Altoona.
Case law on this seemingly requires some nexus to a border. In Almeida-Sanchez v US[0], a Mexican citizen was stopped while driving on an east-west road that was near the border but that didn't connect to the border. The marijuana that was found in his car was excluded because there was no proof he was actually crossing a border, just near it.
So I'd expect, under a functioning legal system, a warrant would be required to search your phone if you landed in JFK on a flight from Altoona.
[0]: https://www.oyez.org/cases/1972/71-6278