fix race condition in OperationScheduler

OperationScheduler's toString() method got the set of keys from a
SharedPreferences, and then did individual lookups of those keys
assuming they would all succeed, but the shared prefs object can be
mutated by a another thread while that is going on.

Fix to take a snapshot with getAll() and then iterate over the
snapshot.

Bug: 15744821
Change-Id: I6a901ec7f4e632e149db3bf6c226f935bc152402
1 file changed