commit | 9f03501179e76d7fc726df3c1f907b229e4ecf02 | [log] [tgz] |
---|---|---|
author | Shaowei Shen <shaoweishen@google.com> | Thu Nov 30 07:17:47 2023 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Nov 30 07:17:47 2023 +0000 |
tree | f84853a6ea6633378ab63e18a95181edc9563634 | |
parent | a7b3ac7384c51f6553b78e895469a57e32f3e5ce [diff] | |
parent | 365f55efc5c97b37a58661075a7b447f9a526689 [diff] |
Merge "[PK Setting] update searchable if page is not visible" into main
diff --git a/src/com/android/settings/inputmethod/ModifierKeysSettings.java b/src/com/android/settings/inputmethod/ModifierKeysSettings.java index 2353c2c..f174598 100644 --- a/src/com/android/settings/inputmethod/ModifierKeysSettings.java +++ b/src/com/android/settings/inputmethod/ModifierKeysSettings.java
@@ -58,7 +58,8 @@ protected boolean isPageSearchEnabled(Context context) { return FeatureFlagUtils .isEnabled( - context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_MODIFIER_KEY); + context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_MODIFIER_KEY) + && !PhysicalKeyboardFragment.getHardKeyboards(context).isEmpty(); } }; }
diff --git a/src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java b/src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java index 1ca9ee6..0e95840 100644 --- a/src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java +++ b/src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java
@@ -474,5 +474,10 @@ sir.xmlResId = R.xml.physical_keyboard_settings; return Arrays.asList(sir); } + + @Override + protected boolean isPageSearchEnabled(Context context) { + return !getHardKeyboards(context).isEmpty(); + } }; }