Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eeb187c2 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Introduce IME switcher revamp API flag

Following up from [1], this introduces a new IME_SWITCHER_REVAMP_API
flag, to move the API changes of the feature under a separate flag.

  [1]: I18e7c5dc5271bee44e4540b3070b989df4e27c4c

Test: atest
  InputMethodInfoTest#testEquals
  InputMethodInfoTest#testInputMethodInfoProperties
  InputMethodInfoTest#testInputMethodInfoWriteToParcel
Bug: 311791923
Flag: android.view.inputmethod.ime_switcher_revamp_api
Change-Id: Ibb4158fffc00666e295b93adc2542024416f4f2c
parent e664a076
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1058,7 +1058,7 @@ package android {
    field public static final int label = 16842753; // 0x1010001
    field public static final int labelFor = 16843718; // 0x10103c6
    field @Deprecated public static final int labelTextSize = 16843317; // 0x1010235
    field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") public static final int languageSettingsActivity;
    field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") public static final int languageSettingsActivity;
    field public static final int languageTag = 16844040; // 0x1010508
    field public static final int largeHeap = 16843610; // 0x101035a
    field public static final int largeScreens = 16843398; // 0x1010286
@@ -56331,7 +56331,7 @@ package android.view.inputmethod {
  public final class InputMethodInfo implements android.os.Parcelable {
    ctor public InputMethodInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    ctor public InputMethodInfo(String, String, CharSequence, String);
    method @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") @Nullable public android.content.Intent createImeLanguageSettingsActivityIntent();
    method @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") @Nullable public android.content.Intent createImeLanguageSettingsActivityIntent();
    method @Nullable public android.content.Intent createStylusHandwritingSettingsActivityIntent();
    method public int describeContents();
    method public void dump(android.util.Printer, String);
@@ -56352,7 +56352,7 @@ package android.view.inputmethod {
    method public boolean supportsStylusHandwriting();
    method public boolean suppressesSpellChecker();
    method public void writeToParcel(android.os.Parcel, int);
    field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") public static final String ACTION_IME_LANGUAGE_SETTINGS = "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";
    field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") public static final String ACTION_IME_LANGUAGE_SETTINGS = "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";
    field public static final String ACTION_STYLUS_HANDWRITING_SETTINGS = "android.view.inputmethod.action.STYLUS_HANDWRITING_SETTINGS";
    field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR;
  }
+3 −3
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public final class InputMethodInfo implements Parcelable {
     *
     * @see #createImeLanguageSettingsActivityIntent()
     */
    @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP)
    @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API)
    public static final String ACTION_IME_LANGUAGE_SETTINGS =
            "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";

@@ -298,7 +298,7 @@ public final class InputMethodInfo implements Parcelable {
                    com.android.internal.R.styleable.InputMethod);
            settingsActivityComponent = sa.getString(
                    com.android.internal.R.styleable.InputMethod_settingsActivity);
            if (Flags.imeSwitcherRevamp()) {
            if (Flags.imeSwitcherRevampApi()) {
                languageSettingsActivityComponent = sa.getString(
                        com.android.internal.R.styleable.InputMethod_languageSettingsActivity);
            }
@@ -888,7 +888,7 @@ public final class InputMethodInfo implements Parcelable {
     *
     * @attr ref R.styleable#InputMethod_languageSettingsActivity
     */
    @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP)
    @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API)
    @Nullable
    public Intent createImeLanguageSettingsActivityIntent() {
        if (TextUtils.isEmpty(mLanguageSettingsActivityName)) {
+9 −0
Original line number Diff line number Diff line
@@ -81,6 +81,15 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "ime_switcher_revamp_api"
    is_exported: true
    namespace: "input_method"
    description: "Feature flag for APIs for revamping the Input Method Switcher menu"
    bug: "311791923"
    is_fixed_read_only: true
}

flag {
    name: "initiation_without_input_connection"
    namespace: "input_method"
+1 −1
Original line number Diff line number Diff line
@@ -4304,7 +4304,7 @@
        <attr name="settingsActivity" format="string" />
        <!-- Component name of an activity that allows the user to modify
             on-screen keyboards variants (e.g. different language or layout) for this service. -->
        <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") -->
        <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") -->
        <attr name="languageSettingsActivity" format="string"/>
        <!-- Set to true in all of the configurations for which this input
             method should be considered an option as the default. -->
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@
    <public name="optional"/>
    <!-- @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") -->
    <public name="adServiceTypes" />
    <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") -->
    <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") -->
    <public name="languageSettingsActivity"/>
    <!-- @FlaggedApi("android.service.controls.flags.Flags.FLAG_HOME_PANEL_DREAM") -->
    <public name="dreamCategory"/>
Loading