diff options
3 files changed, 3 insertions, 12 deletions
| diff --git a/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java b/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java index 5ff82cd550ca..bc3643abb86c 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java @@ -209,7 +209,9 @@ final class InputMethodMenuController {      }      void updateKeyboardFromSettingsLocked() { -        mShowImeWithHardKeyboard = mSettings.isShowImeWithHardKeyboardEnabled(); +        mShowImeWithHardKeyboard = +                SecureSettingsWrapper.getBoolean(Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD, +                        false, mService.getCurrentImeUserIdLocked());          if (mSwitchingDialog != null && mSwitchingDialogTitleView != null                  && mSwitchingDialog.isShowing()) {              final Switch hardKeySwitch = mSwitchingDialogTitleView.findViewById( diff --git a/services/core/java/com/android/server/inputmethod/InputMethodUtils.java b/services/core/java/com/android/server/inputmethod/InputMethodUtils.java index 26cb8209faba..a0b55edddec7 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodUtils.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodUtils.java @@ -660,10 +660,6 @@ final class InputMethodUtils {              return getInt(Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE, NOT_A_SUBTYPE_ID);          } -        boolean isShowImeWithHardKeyboardEnabled() { -            return getBoolean(Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD, false); -        } -          @UserIdInt          public int getCurrentUserId() {              return mCurrentUserId; diff --git a/services/tests/servicestests/src/com/android/server/inputmethod/InputMethodUtilsTest.java b/services/tests/servicestests/src/com/android/server/inputmethod/InputMethodUtilsTest.java index 6dd91718f70d..a2f8c8bbe13e 100644 --- a/services/tests/servicestests/src/com/android/server/inputmethod/InputMethodUtilsTest.java +++ b/services/tests/servicestests/src/com/android/server/inputmethod/InputMethodUtilsTest.java @@ -1239,9 +1239,6 @@ public class InputMethodUtilsTest {                  methodMap, 0 /* userId */);          assertEquals(0, settings.getCurrentUserId()); -        settings.isShowImeWithHardKeyboardEnabled(); -        verify(ownerUserContext.getContentResolver(), atLeastOnce()).getAttributionSource(); -          settings.getEnabledInputMethodSubtypeListLocked(nonSystemIme, true);          verify(ownerUserContext.getResources(), atLeastOnce()).getConfiguration(); @@ -1250,10 +1247,6 @@ public class InputMethodUtilsTest {          settings.switchCurrentUser(10 /* userId */);          assertEquals(10, settings.getCurrentUserId()); -        settings.isShowImeWithHardKeyboardEnabled(); -        verify(TestContext.getSecondaryUserContext().getContentResolver(), -                atLeastOnce()).getAttributionSource(); -          settings.getEnabledInputMethodSubtypeListLocked(nonSystemIme, true);          verify(TestContext.getSecondaryUserContext().getResources(),                  atLeastOnce()).getConfiguration(); |