Earlier quoted context omitted.
There was an interesting talk at one edition of CCC that boiled down to saying those techniques work only if you have the right to remain silent. Which depends on the country you're in. And I heard that in the USA, even though you have the right to remain silent, they still have the right to put you in jail if you refuse to give out your key.
You're thinking the RIP Act in the UK where the police can get an order from a judge for you to turn over a key/passphrase and you need to either prove you don't know it or face up to two years in jail (five for cases of child abuse or national security). I'm not American but I'm pretty sure no law like that in the US would be upheld at appeal, it's pretty directly conflicting with the 5th amendment.
I'm not a lawyer, but from what I remember in the USA the 5th amendment defense works only with some kinds of keys: it works with a password, but wouldn't work with a "pattern" (i.e. Android's option of drawing a pattern by connecting dots) or biometric authentication.