If a cop pulls you over he can legally search and look at anything that is not locked without a search warrant. I am not sure if a password on a phone counts as locking but I know that if you have a glovebox with a lock on it he can not look in there without a search warrant.