If you don't fill in the information they just ask if they can take a look at your Phone.
Ofcourse you can refuse... if you don't want to enter the country anyway.
https://www.nytimes.com/2017/02/14/b...rt-phones.html
in Canada Also:
What happens when a Canadian border agent asks to search your phone? | CBC News
Now hapening in more and more countries. Heard stories of Mexican customs who did it to see if people had income in Mexico trough Airbnb. Just looked in their email.