Merge "Fix race condition between restart and stop/reset." am: ee14225e0d
am: 5c5a6bdc87

Change-Id: Id9c1bb0ecd1b7b02c60fd2f0ce6ab67ea8f7096d