Removed duplicated code

Change-Id: I411fc0cb2f09ad7ae091abec1138aa2ec7fd5e16
Closes-Bug: #1389635