Made the updateView as a local function such that it doesn't get added
to global scope

Change-Id: I994756f67b305fd9c007d47ec18f5e856ac02c90
Merge "Made the updateView as a local function such that it doesn't get added to global scope"