Make sure to handle duplicated stopRecording calls safely

Change-Id: Id2054daca9b0607b5739466d1e7a54583dd87d40