sync: Imported from jb_mr1_chocolate branch of caf