Make "Cancel" reset preferences and "Apply" save and close

Bug: 48898
Change-Id: I9f5444ffd57ddf46d197ebdb23a18c0c4600b196