Yes but couldn't they just use plain view to claim that in searching your phone the pirated videos became plain view? In that case you would literally be aiding your own prosecution of something even if you didn't intend to by giving up your password. The only real requirement is that the officer be legally allowed on the device, which a warrant allows and belief that the item is illegal, which is all but impossible to disprove. You literally open the door to further prosecution, even if the first accusation is thrown out. The laws were not written in such a way as to cover technology.