This is a follow-up to 7cbcfd4f where during the review it was pointed out that the code could be streamlined. Bug: 18088752 Change-Id: Iecb9fdbc31a0f3cdcb94ddb1b3e7e12a0543a231