Police officers are trained to notice who is acting suspicious, just like when they set up fake "drug stops" and pull over anyone who attempts to turn around, throws something out the window, etc. as having a DRUG STOP is against the law, so is setting up a dog and searching people.
It's against the law in Canada at least, they cannot use a dog to gain probable cause to search or detain.
Where I live "drug dogs" are few and far between, and cadaver dogs (search and rescue) are prevalent, they use this tactic in schools as whoever is acting suspisious they simply ask to search them.
As a kid I purposefully would act suspicious and when they told me to empty my pockets I gave them a giant "fuck you, I'm not waiving my rights".. "I'll empty them once you arrest me".. It was always great fun, as they would call there supervisor and they would then be told to leave me alone.
http://nathanr.ca/law/canada-high-court-rules-police-dogs-sniff-is-unlawful-search/
***
Higher Education, I've been sniffed right threw by a drug dog, they sniffed my locker (it was in smelly proof bag, was about 14 grams).. Nothing, They sniffed me and found a nickel in my pocket from packing a bowl a few weeks ago, it went threw the wash. It could have been because I was stoned to hell, not sure WHAT the dog smelled.
The dog picked up the .5g/me from about 10 metres away.
They didn't even find the nickel, they assumed I was smoking it and AGAIN when the dog went nuts I said i'm not consenting to a search. They fucked off.
Sad thing is, most students don't know there rights.
MAKE SURE THERE IS NOT RESIDUE ON THE OUTSIDE OF THE BAG. Cannot stress that enough, sometimes its enough to hit a drug dog.