Refactor the management of profile keys
am: 849439ac18

Change-Id: I21672c23766a84463a80b985025272c46f1ca5e1