My guess is in the U.S. the 4th and 5th amendment would prevent the government from forcing you to reveal the secret, so long as you do not rely on biometric security, which has been in some cases ruled as exempt from the same rights as say a password. IANAL though, so I really can't elaborate on an explanation of why. I think if anything you're likely to be held on obstruction charges or have your assets frozen in an attempt to apply pressure on someone unwilling to cooperate. In other, perhaps less forgiving locales like North Korea, China, or Russia, I imagine one may end up being the subject of persuasion of a more physical nature.
The irony is that while the Android development team is doing this, the Google business and cloud services teams are increasingly gathering more data from the Android users, and encouraging them to put as much of their data on Google's servers as possible. And Google can give access to that data because it doesn't use end-to-end or homomorphic encryption.
That applies especially to non-law enforcement actors. Those can't get a court order to force Google to hand over the data.
Many European countries have 'key disclosure' laws; give us the keys, or go to jail. In these cases, silence is illegal.
[0] https://www.reddit.com/r/nexus5x/comments/3us0f6/pin_require...
The idea is that nothing, not even Google, can change the change the firmware without first wiping the device or entering the passcode.