Better management of navbar and hardware keys settings

Change-Id: I0588ab3d0e4c2658078cd7b62490c4faddc41d6e