This change partially reverts changes done in I97e33caa8e. Bug: Issue 8377 Change-Id: I9f9c5c3655592d8f7d0b2af330005e9289ea1f81