Fix VDM IME handling:

1. Whenever the selected input method changes, also update the default
   device input method in settings, if the current device is the
   default one.

2. Whenever new settings instance is created, always pass the current
   device id, so the settings constructor knows whether to restore the
   stored default device id or not.

Test: atest VirtualDeviceImeTest --iterations=50
Bug: 287269288

Change-Id: Ic8646fef8a18f03cdd387dc672bea991338c6793
2 files changed