The Court of Appeal for Ontario says the right of police to search through your cellphone depends on whether or not you have a passcode, reports the Canadian Press.

If a passcode is present, police should get a warrant in order to look through your phone. The decision comes from a case where Kevin Fearon appealed his robbery conviction and argued police breached his rights under the Charter of Rights and Freedoms. How so? Police looked through his phone after his arrest and discovered photos of a gun, cash and text message evidence linked to his alleged jewellery heist in Toronto at the time, back in 2009.

His appeal was ultimately denied by the Ontario Court of Appeal, as they noted police were allowed to search Fearon’s phone “in a cursory fashion” to look for evidence related to the crime but should have requested a search warrant soon after. If the phone had a passcode, the judges noted “it would not have been appropriate” to look through the phone without a warrant.

“There was no suggestion in this case that this particular cell phone functioned as a ‘mini-computer’ nor that its contents were not ‘immediately visible to the eye,’ the court said in its ruling, released Wednesday. “Rather, because the phone was not password protected, the photos and the text message were readily available to other users.”

Appeal Court judges referred to a precedent set in a former murder trial where the judge did not permit evident from a personal electronic device as it “functioned as a mini-computer,” known to have a high expectation of privacy. In that case, data was extracted by police using specialized equipment. The court declined to create a new specific rule for cellphone searches saying “if it ain’t broke, don’t fix it.”

For those without passcodes on their iPhones, you should be saying to yourself right now “note to self: set a passcode.”