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

Commit 104932e4 authored by Taran Singh's avatar Taran Singh
Browse files

Make IME extract text fields public

InputMethodService uses the following IDs for extract view.
- R.id.inputExtractEditText
- R.id.inputExtractAction
- R.id.inputExtractAccessories
While the first one is public, others are not. It makes sense to make
all of the public so IMEs can customize it.

Bug: 210777608
Test: atest InputMethodServiceTest

Change-Id: I125767d67839293c0b0f40c750d0fb1bb77951e9
parent 490be11e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2103,6 +2103,8 @@ package android {
    field public static final int icon_frame = 16908350; // 0x102003e
    field public static final int input = 16908297; // 0x1020009
    field public static final int inputArea = 16908318; // 0x102001e
    field public static final int inputExtractAccessories;
    field public static final int inputExtractAction;
    field public static final int inputExtractEditText = 16908325; // 0x1020025
    field @Deprecated public static final int keyboardView = 16908326; // 0x1020026
    field public static final int list = 16908298; // 0x102000a
+4 −2
Original line number Diff line number Diff line
@@ -2175,10 +2175,12 @@ public class InputMethodService extends AbstractInputMethodService {
    }
    
    /**
     * Called by the framework to create the layout for showing extacted text.
     * Called by the framework to create the layout for showing extracted text.
     * Only called when in fullscreen mode.  The returned view hierarchy must
     * have an {@link ExtractEditText} whose ID is 
     * {@link android.R.id#inputExtractEditText}.
     * {@link android.R.id#inputExtractEditText}, with action ID
     * {@link android.R.id#inputExtractAction} and accessories ID
     * {@link android.R.id#inputExtractAccessories}.
     */
    public View onCreateExtractTextView() {
        return mInflater.inflate(
+6 −0
Original line number Diff line number Diff line
@@ -59,6 +59,12 @@
  <item type="id" name="candidatesArea" />
  <item type="id" name="inputArea" />
  <item type="id" name="inputExtractEditText" />
  <!-- View id for the action of text editor inside of an extracted text
        {@link InputMethodService#onCreateExtractTextView IME extract view}. -->
  <item type="id" name="inputExtractAction" />
  <!-- View id for the accessories of text editor inside of an extracted text
        {@link InputMethodService#onCreateExtractTextView IME extract view}. -->
  <item type="id" name="inputExtractAccessories" />
  <item type="id" name="selectAll" />
  <item type="id" name="cut" />
  <item type="id" name="copy" />
+2 −0
Original line number Diff line number Diff line
@@ -3267,6 +3267,8 @@
    <public name="accessibilityActionSwipeUp" />
    <public name="accessibilityActionSwipeDown" />
    <public name="accessibilityActionShowSuggestions" />
    <public name="inputExtractAction" />
    <public name="inputExtractAccessories" />
  </staging-public-group>

  <staging-public-group type="style" first-id="0x01dd0000">