Merge "Take state snapshot in IMMS#attachNewInputLocked()"