Compare with oldSoftInputMode after restoring softInputMode

... of mWindowAttributes. Apps might update LayoutParams with
softInputMode unspecified on applying insets, and this can cause
infinite loop in the previous logic, because we would auto-compute
softInputMode for the unspecified one, which makes app's softInputMode
never be the same as the one in ViewRootImpl.mWindowAttributes.

Fix: 163009478
Test: Print stack trace before calling requestFitSystemWindows() and
      follow the steps in the bug.
Test: Open Messages, go to attachments, reopen IME
Change-Id: I2341121b69209688c2f6fb033f51611b21422a04
1 file changed