summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/inputmethod/InputMethodInfo.java9
-rw-r--r--core/res/res/layout/input_method_switch_dialog_new.xml3
-rw-r--r--core/res/res/values/strings.xml6
3 files changed, 13 insertions, 5 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index 0e66f7ac47b7..806a59334689 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -878,15 +878,18 @@ public final class InputMethodInfo implements Parcelable {
/**
* Returns {@link Intent} for IME language settings activity with
- * {@link Intent#getAction() Intent action} {@link #ACTION_IME_LANGUAGE_SETTINGS},
- * else <code>null</code> if
- * {@link android.R.styleable#InputMethod_languageSettingsActivity} is not defined.
+ * {@link Intent#getAction() Intent action} {@link #ACTION_IME_LANGUAGE_SETTINGS}. If
+ * {@link android.R.styleable#InputMethod_languageSettingsActivity} is not defined, tries to
+ * fall back to the IME general settings activity. If
+ * {@link android.R.styleable#InputMethod_settingsActivity} is also not defined,
+ * returns {code null}.
*
* <p>To launch IME language settings, use this method to get the {@link Intent} to launch
* the IME language settings activity.</p>
* <p>e.g.<pre><code>startActivity(createImeLanguageSettingsActivityIntent());</code></pre></p>
*
* @attr ref R.styleable#InputMethod_languageSettingsActivity
+ * @attr ref R.styleable#InputMethod_settingsActivity
*/
@FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API)
@Nullable
diff --git a/core/res/res/layout/input_method_switch_dialog_new.xml b/core/res/res/layout/input_method_switch_dialog_new.xml
index 610a212bbd4e..058fe3fe3076 100644
--- a/core/res/res/layout/input_method_switch_dialog_new.xml
+++ b/core/res/res/layout/input_method_switch_dialog_new.xml
@@ -71,9 +71,10 @@
android:layout_height="wrap_content"
android:background="@drawable/input_method_switch_button"
android:layout_gravity="end"
- android:text="@string/input_method_language_settings"
+ android:text="@string/input_method_switcher_settings_button"
android:fontFamily="google-sans-text"
android:textAppearance="?attr/textAppearance"
+ android:contentDescription="@string/input_method_language_settings"
android:visibility="gone"/>
</LinearLayout>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index cb58339f5ef3..f40466610724 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3280,6 +3280,9 @@
<!-- Accessibility text for the long click action on the switch input method button. This will
be used following "Double-tap and hold to..." [CHAR LIMIT=NONE] -->
<string name="input_method_ime_switch_long_click_action_desc">Open input method picker</string>
+ <!-- Button to access the language settings of the current input method
+ from the Input Method Switcher menu. [CHAR LIMIT=50]-->
+ <string name="input_method_switcher_settings_button">Settings</string>
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the title of that notification. -->
<string name="low_internal_storage_view_title">Storage space running out</string>
@@ -3883,7 +3886,8 @@
<!-- Title of the pop-up dialog in which the user switches keyboard, also known as input method. -->
<string name="select_input_method">Choose input method</string>
- <!-- Button to access the language settings of the current input method. [CHAR LIMIT=50]-->
+ <!-- Content description of the button to access the language settings of the current input method
+ from the Input Method Switcher menu, for accessibility (not shown on the screen). [CHAR LIMIT=NONE]-->
<string name="input_method_language_settings">Language Settings</string>
<!-- Summary text of a toggle switch to enable/disable use of the IME while a physical
keyboard is connected -->