The advice in this WIRED article about retaining your privacy when going through US customs also applies on an everyday basis

From the article:

If customs officials do take your devices, don’t make their intrusion easy. Encrypt your hard drive with tools like BitLocker, TrueCrypt, or Apple’s Filevault, and choose a strong passphrase. On your phone—preferably an iPhone, given Apple’s track record of foiling federal cracking—set a strong PIN and disable Siri from the lockscreen by switching off “Access When Locked” under the Siri menu in Settings.

Remember also to turn your devices off before entering customs: Hard drive encryption tools only offer full protection when a computer is fully powered down. If you use TouchID, your iPhone is safest when it’s turned off, too, since it requires a PIN rather than a fingerprint when first booted, resolving any ambiguity about whether border officials can compel you to unlock the device with a finger instead of a PIN—a real concern given that green card holders are required to offer their fingerprints with every border crossing.

There’s a great example of how to be truly subversive later on in that article where it suggests that you turn on two-factor authentication on all your accounts (which you should use anyway) and then remove the SIM card from the phone you’d use to get the code you need. That way you can’t be forced to unlock your device. You can post generated backup codes to yourself, or get someone you trust to send them to you once you’ve cleared security. Genius.