Xinjiang and Tibet are a different matter, but elsewhere just behave in the same civil manner you'd behave visiting Paris. China is a police state in many respects, but it's not a police state in the East German sense: it doesn't feel oppressive (at least not until you look up and notice the security cameras everywhere).
So instead of worrying about your behaviour, worry about traffic, bikes heading at you while you're walking about especially. That's the trouble you should worry about. Constantly.