I don't think ordinary citizens should be required to know the law in lawyer-like detail when they travel.
I think in the broad strokes, you're probably right about his legal situation, but it suuuuuucks and it's not what I think of when I hear the word "freedom," for sure.
I believe the threat here was: Tell us the access code or we confiscate your phone, which we'll hack into at our leisure.