Set the default input method to default_touch_input_method value am: ac0fdd7550

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/RotaryController/+/12819683

Change-Id: Id5e5fc03b1473bc8ea5d98854f81f37280b9a781
diff --git a/src/com/android/car/rotary/RotaryService.java b/src/com/android/car/rotary/RotaryService.java
index 79e03cf..824efe8 100644
--- a/src/com/android/car/rotary/RotaryService.java
+++ b/src/com/android/car/rotary/RotaryService.java
@@ -346,6 +346,11 @@
         if (isValidIme(defaultTouchInputMethod)) {
             mTouchInputMethod = mPrefs.getString(
                 TOUCH_INPUT_METHOD_PREFIX + mUserManager.getUserName(), defaultTouchInputMethod);
+            // Set the DEFAULT_INPUT_METHOD in case Android defaults to the rotary_input_method.
+            // TODO(b/169423887): Figure out how to configure the default IME through Android
+            // without needing to do this.
+            Settings.Secure.putString(
+                    getContentResolver(), DEFAULT_INPUT_METHOD, mTouchInputMethod);
         }
         String rotaryInputMethod = res.getString(R.string.rotary_input_method);
         if (isValidIme(rotaryInputMethod)) {