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

Change-Id: I432f815f2b40208d3f3949a033973ee4dd179a9a