Whether it's legal or not, the police will search your phone and computer. Then after the fact they will try to justify it if something is useful against you. Sorry Constitutional law buffs, but that's the facts. Later, after being charged with a crime you might be able to get it tossed out. But the smart thing to do is not to keep anything in there.