The safest bet is just to wait for a couple of minutes, observe the animal for any changes. It's going to become really clear in that time if there's distress, or just... being a dog.
Then, if you're still concerned call the police, and wait for them. If while waiting you become concerned for the dog's life, break the window.
It's also tremendously inconvenient. You might be a few minutes late for your next thing if you wait for the police. Doing the right thing is only reasonable if it costs nothing.
(In case I did deadpan too well, BIG FAT SARCASM INDICATOR.)
I know it's sarcasm, just wanted to add that I've never seen police respond in under 30 minutes. Even when the police department is literally 20 minutes WALKING distance.
Edit: That was in a small town though, I guess it's different in the city where I constantly hear sirens.
Then, if you're still concerned call the police, and wait for them. If while waiting you become concerned for the dog's life, break the window.