Add support for image insertion on Android (flutter/engine#35619)
This commit is contained in:
@@ -16,6 +16,7 @@ import io.flutter.plugin.editing.TextEditingDelta;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.json.JSONArray;
|
||||
@@ -325,6 +326,14 @@ public class TextInputChannel {
|
||||
Arrays.asList(inputClientId, "TextInputAction.unspecified"));
|
||||
}
|
||||
|
||||
/** Instructs Flutter to commit inserted content back to the text channel. */
|
||||
public void commitContent(int inputClientId, Map<String, Object> content) {
|
||||
Log.v(TAG, "Sending 'commitContent' message.");
|
||||
channel.invokeMethod(
|
||||
"TextInputClient.performAction",
|
||||
Arrays.asList(inputClientId, "TextInputAction.commitContent", content));
|
||||
}
|
||||
|
||||
public void performPrivateCommand(
|
||||
int inputClientId, @NonNull String action, @NonNull Bundle data) {
|
||||
HashMap<Object, Object> json = new HashMap<>();
|
||||
@@ -454,6 +463,19 @@ public class TextInputChannel {
|
||||
}
|
||||
}
|
||||
final Integer inputAction = inputActionFromTextInputAction(inputActionName);
|
||||
|
||||
// Build list of content commit mime types from the data in the JSON list.
|
||||
List<String> contentList = new ArrayList<String>();
|
||||
JSONArray contentCommitMimeTypes =
|
||||
json.isNull("contentCommitMimeTypes")
|
||||
? null
|
||||
: json.getJSONArray("contentCommitMimeTypes");
|
||||
if (contentCommitMimeTypes != null) {
|
||||
for (int i = 0; i < contentCommitMimeTypes.length(); i++) {
|
||||
contentList.add(contentCommitMimeTypes.optString(i));
|
||||
}
|
||||
}
|
||||
|
||||
return new Configuration(
|
||||
json.optBoolean("obscureText"),
|
||||
json.optBoolean("autocorrect", true),
|
||||
@@ -465,6 +487,7 @@ public class TextInputChannel {
|
||||
inputAction,
|
||||
json.isNull("actionLabel") ? null : json.getString("actionLabel"),
|
||||
json.isNull("autofill") ? null : Autofill.fromJson(json.getJSONObject("autofill")),
|
||||
contentList.toArray(new String[contentList.size()]),
|
||||
fields);
|
||||
}
|
||||
|
||||
@@ -622,6 +645,7 @@ public class TextInputChannel {
|
||||
@Nullable public final Integer inputAction;
|
||||
@Nullable public final String actionLabel;
|
||||
@Nullable public final Autofill autofill;
|
||||
@Nullable public final String[] contentCommitMimeTypes;
|
||||
@Nullable public final Configuration[] fields;
|
||||
|
||||
public Configuration(
|
||||
@@ -635,6 +659,7 @@ public class TextInputChannel {
|
||||
@Nullable Integer inputAction,
|
||||
@Nullable String actionLabel,
|
||||
@Nullable Autofill autofill,
|
||||
@Nullable String[] contentCommitMimeTypes,
|
||||
@Nullable Configuration[] fields) {
|
||||
this.obscureText = obscureText;
|
||||
this.autocorrect = autocorrect;
|
||||
@@ -646,6 +671,7 @@ public class TextInputChannel {
|
||||
this.inputAction = inputAction;
|
||||
this.actionLabel = actionLabel;
|
||||
this.autofill = autofill;
|
||||
this.contentCommitMimeTypes = contentCommitMimeTypes;
|
||||
this.fields = fields;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
|
||||
package io.flutter.plugin.editing;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.DynamicLayout;
|
||||
@@ -22,11 +24,20 @@ import android.view.inputmethod.CursorAnchorInfo;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.ExtractedText;
|
||||
import android.view.inputmethod.ExtractedTextRequest;
|
||||
import android.view.inputmethod.InputContentInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.view.inputmethod.InputConnectionCompat;
|
||||
import io.flutter.Log;
|
||||
import io.flutter.embedding.engine.FlutterJNI;
|
||||
import io.flutter.embedding.engine.systemchannels.TextInputChannel;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class InputConnectionAdaptor extends BaseInputConnection
|
||||
implements ListenableEditingState.EditingStateWatcher {
|
||||
@@ -477,6 +488,75 @@ public class InputConnectionAdaptor extends BaseInputConnection
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@TargetApi(25)
|
||||
@RequiresApi(25)
|
||||
public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
|
||||
// Ensure permission is granted.
|
||||
if (Build.VERSION.SDK_INT >= 25
|
||||
&& (flags & InputConnectionCompat.INPUT_CONTENT_GRANT_READ_URI_PERMISSION) != 0) {
|
||||
try {
|
||||
inputContentInfo.requestPermission();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (inputContentInfo.getDescription().getMimeTypeCount() > 0) {
|
||||
inputContentInfo.requestPermission();
|
||||
|
||||
final Uri uri = inputContentInfo.getContentUri();
|
||||
final String mimeType = inputContentInfo.getDescription().getMimeType(0);
|
||||
Context context = mFlutterView.getContext();
|
||||
|
||||
if (uri != null) {
|
||||
InputStream is;
|
||||
try {
|
||||
// Extract byte data from the given URI.
|
||||
is = context.getContentResolver().openInputStream(uri);
|
||||
} catch (FileNotFoundException ex) {
|
||||
inputContentInfo.releasePermission();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is != null) {
|
||||
final byte[] data = this.readStreamFully(is, 64 * 1024);
|
||||
|
||||
final Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("mimeType", mimeType);
|
||||
obj.put("data", data);
|
||||
obj.put("uri", uri.toString());
|
||||
|
||||
// Commit the content to the text input channel and release the permission.
|
||||
textInputChannel.commitContent(mClient, obj);
|
||||
inputContentInfo.releasePermission();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inputContentInfo.releasePermission();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private byte[] readStreamFully(InputStream is, int blocksize) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
|
||||
byte[] buffer = new byte[blocksize];
|
||||
while (true) {
|
||||
int len = -1;
|
||||
try {
|
||||
len = is.read(buffer);
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
if (len == -1) break;
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
// -------- Start: ListenableEditingState watcher implementation -------
|
||||
@Override
|
||||
public void didChangeEditingState(
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.core.view.inputmethod.EditorInfoCompat;
|
||||
import io.flutter.Log;
|
||||
import io.flutter.embedding.android.KeyboardManager;
|
||||
import io.flutter.embedding.engine.systemchannels.TextInputChannel;
|
||||
@@ -342,6 +343,11 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
}
|
||||
outAttrs.imeOptions |= enterAction;
|
||||
|
||||
if (configuration.contentCommitMimeTypes != null) {
|
||||
String[] imgTypeString = configuration.contentCommitMimeTypes;
|
||||
EditorInfoCompat.setContentMimeTypes(outAttrs, imgTypeString);
|
||||
}
|
||||
|
||||
InputConnectionAdaptor connection =
|
||||
new InputConnectionAdaptor(
|
||||
view, inputTarget.id, textInputChannel, keyboardManager, mEditable, outAttrs);
|
||||
|
||||
@@ -16,9 +16,12 @@ import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.ClipDescription;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
@@ -31,7 +34,9 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.ExtractedText;
|
||||
import android.view.inputmethod.ExtractedTextRequest;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputContentInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.core.view.inputmethod.InputConnectionCompat;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
@@ -43,7 +48,9 @@ import io.flutter.embedding.engine.systemchannels.TextInputChannel;
|
||||
import io.flutter.plugin.common.JSONMethodCodec;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.util.FakeKeyEvent;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.junit.Before;
|
||||
@@ -52,10 +59,12 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.Shadows;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.robolectric.annotation.Implementation;
|
||||
import org.robolectric.annotation.Implements;
|
||||
import org.robolectric.shadow.api.Shadow;
|
||||
import org.robolectric.shadows.ShadowContentResolver;
|
||||
import org.robolectric.shadows.ShadowInputMethodManager;
|
||||
|
||||
@Config(
|
||||
@@ -64,6 +73,9 @@ import org.robolectric.shadows.ShadowInputMethodManager;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class InputConnectionAdaptorTest {
|
||||
private final Context ctx = ApplicationProvider.getApplicationContext();
|
||||
private ContentResolver contentResolver;
|
||||
private ShadowContentResolver shadowContentResolver;
|
||||
|
||||
@Mock KeyboardManager mockKeyboardManager;
|
||||
// Verifies the method and arguments for a captured method call.
|
||||
private void verifyMethodCall(ByteBuffer buffer, String methodName, String[] expectedArgs)
|
||||
@@ -83,6 +95,8 @@ public class InputConnectionAdaptorTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.openMocks(this);
|
||||
contentResolver = ctx.getContentResolver();
|
||||
shadowContentResolver = Shadows.shadowOf(contentResolver);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -171,6 +185,65 @@ public class InputConnectionAdaptorTest {
|
||||
assertTrue(editable.toString().startsWith(textToBePasted));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCommitContent() throws JSONException {
|
||||
View testView = new View(ctx);
|
||||
int client = 0;
|
||||
FlutterJNI mockFlutterJNI = mock(FlutterJNI.class);
|
||||
DartExecutor dartExecutor = spy(new DartExecutor(mockFlutterJNI, mock(AssetManager.class)));
|
||||
TextInputChannel textInputChannel = new TextInputChannel(dartExecutor);
|
||||
ListenableEditingState editable = sampleEditable(0, 0);
|
||||
InputConnectionAdaptor adaptor =
|
||||
new InputConnectionAdaptor(
|
||||
testView,
|
||||
client,
|
||||
textInputChannel,
|
||||
mockKeyboardManager,
|
||||
editable,
|
||||
null,
|
||||
mockFlutterJNI);
|
||||
|
||||
String uri = "content://mock/uri/test/commitContent";
|
||||
Charset charset = Charset.forName("UTF-8");
|
||||
String fakeImageData = "fake image data";
|
||||
byte[] fakeImageDataBytes = fakeImageData.getBytes(charset);
|
||||
shadowContentResolver.registerInputStream(
|
||||
Uri.parse(uri), new ByteArrayInputStream(fakeImageDataBytes));
|
||||
|
||||
boolean commitContentSuccess =
|
||||
adaptor.commitContent(
|
||||
new InputContentInfo(
|
||||
Uri.parse(uri),
|
||||
new ClipDescription("commitContent test", new String[] {"image/png"})),
|
||||
InputConnectionCompat.INPUT_CONTENT_GRANT_READ_URI_PERMISSION,
|
||||
null);
|
||||
assertTrue(commitContentSuccess);
|
||||
|
||||
ArgumentCaptor<String> channelCaptor = ArgumentCaptor.forClass(String.class);
|
||||
ArgumentCaptor<ByteBuffer> bufferCaptor = ArgumentCaptor.forClass(ByteBuffer.class);
|
||||
verify(dartExecutor, times(1)).send(channelCaptor.capture(), bufferCaptor.capture(), isNull());
|
||||
assertEquals("flutter/textinput", channelCaptor.getValue());
|
||||
|
||||
String fakeImageDataIntString = "";
|
||||
for (int i = 0; i < fakeImageDataBytes.length; i++) {
|
||||
int byteAsInt = fakeImageDataBytes[i];
|
||||
fakeImageDataIntString += byteAsInt;
|
||||
if (i < (fakeImageDataBytes.length - 1)) {
|
||||
fakeImageDataIntString += ",";
|
||||
}
|
||||
}
|
||||
verifyMethodCall(
|
||||
bufferCaptor.getValue(),
|
||||
"TextInputClient.performAction",
|
||||
new String[] {
|
||||
"0",
|
||||
"TextInputAction.commitContent",
|
||||
"{\"data\":["
|
||||
+ fakeImageDataIntString
|
||||
+ "],\"mimeType\":\"image\\/png\",\"uri\":\"content:\\/\\/mock\\/uri\\/test\\/commitContent\"}"
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPerformPrivateCommand_dataIsNull() throws JSONException {
|
||||
View testView = new View(ctx);
|
||||
|
||||
@@ -163,6 +163,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -221,6 +222,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -273,6 +275,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -387,6 +390,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -515,6 +519,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -624,6 +629,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -731,6 +737,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -835,6 +842,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
@@ -923,6 +931,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -960,6 +969,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now. With
|
||||
// changed text, we should
|
||||
@@ -1006,6 +1016,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -1106,6 +1117,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -1146,6 +1158,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -1212,6 +1225,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
// There's a pending restart since we initialized the text input client. Flush that now.
|
||||
textInputPlugin.setTextInputEditingState(
|
||||
@@ -1249,6 +1263,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
InputConnection connection =
|
||||
@@ -1278,6 +1293,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
textInputPlugin.showTextInput(testView);
|
||||
@@ -1310,6 +1326,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill,
|
||||
null,
|
||||
null);
|
||||
|
||||
textInputPlugin.setTextInputClient(
|
||||
@@ -1325,6 +1342,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill,
|
||||
null,
|
||||
new TextInputChannel.Configuration[] {config}));
|
||||
|
||||
final ViewStructure viewStructure = mock(ViewStructure.class);
|
||||
@@ -1368,6 +1386,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null);
|
||||
|
||||
textInputPlugin.setTextInputClient(0, config);
|
||||
@@ -1407,6 +1426,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill,
|
||||
null,
|
||||
null);
|
||||
|
||||
textInputPlugin.setTextInputClient(0, config);
|
||||
@@ -1456,6 +1476,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
null);
|
||||
final TextInputChannel.Configuration config2 =
|
||||
new TextInputChannel.Configuration(
|
||||
@@ -1469,6 +1490,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill2,
|
||||
null,
|
||||
null);
|
||||
|
||||
textInputPlugin.setTextInputClient(
|
||||
@@ -1484,6 +1506,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
new TextInputChannel.Configuration[] {config1, config2}));
|
||||
|
||||
final ViewStructure viewStructure = mock(ViewStructure.class);
|
||||
@@ -1539,6 +1562,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill,
|
||||
null,
|
||||
null));
|
||||
|
||||
final ViewStructure viewStructure = mock(ViewStructure.class);
|
||||
@@ -1596,6 +1620,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
null);
|
||||
final TextInputChannel.Configuration config2 =
|
||||
new TextInputChannel.Configuration(
|
||||
@@ -1609,6 +1634,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill2,
|
||||
null,
|
||||
null);
|
||||
|
||||
// Set client. This should call notifyViewExited on the FlutterView if the previous client is
|
||||
@@ -1625,6 +1651,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
new TextInputChannel.Configuration[] {config1, config2});
|
||||
|
||||
textInputPlugin.setTextInputClient(0, autofillConfiguration);
|
||||
@@ -1669,6 +1696,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
|
||||
assertEquals("1".hashCode(), testAfm.exitId);
|
||||
@@ -1726,6 +1754,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
null);
|
||||
final TextInputChannel.Configuration config2 =
|
||||
new TextInputChannel.Configuration(
|
||||
@@ -1739,6 +1768,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill2,
|
||||
null,
|
||||
null);
|
||||
|
||||
final TextInputChannel.Configuration autofillConfiguration =
|
||||
@@ -1753,6 +1783,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
new TextInputChannel.Configuration[] {config1, config2});
|
||||
|
||||
textInputPlugin.setTextInputClient(0, autofillConfiguration);
|
||||
@@ -1809,6 +1840,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofillConfig,
|
||||
null,
|
||||
null);
|
||||
|
||||
textInputPlugin.setTextInputClient(0, config);
|
||||
@@ -1867,6 +1899,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
null);
|
||||
final TextInputChannel.Configuration config2 =
|
||||
new TextInputChannel.Configuration(
|
||||
@@ -1880,6 +1913,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill2,
|
||||
null,
|
||||
null);
|
||||
|
||||
final TextInputChannel.Configuration autofillConfiguration =
|
||||
@@ -1894,6 +1928,7 @@ public class TextInputPluginTest {
|
||||
null,
|
||||
null,
|
||||
autofill1,
|
||||
null,
|
||||
new TextInputChannel.Configuration[] {config1, config2});
|
||||
|
||||
textInputPlugin.setTextInputClient(0, autofillConfiguration);
|
||||
|
||||
Reference in New Issue
Block a user