Merge branch 'stable-3.0' into stable-3.1 * stable-3.0: Use volatile and AtomicIntegers to be thread safe Change-Id: I0be6a13344043a48f2fc4a0367559f5b5f1fbca9