Revert "Fix first batch of warnings in the Android embedding (#30807)" (flutter/engine#31277)
This reverts commit 2288e0d981.
This commit is contained in:
@@ -876,7 +876,7 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC
|
||||
* methods.
|
||||
*/
|
||||
@Override
|
||||
public boolean checkInputConnectionProxy(@NonNull View view) {
|
||||
public boolean checkInputConnectionProxy(View view) {
|
||||
return flutterEngine != null
|
||||
? flutterEngine.getPlatformViewsController().checkInputConnectionProxy(view)
|
||||
: super.checkInputConnectionProxy(view);
|
||||
@@ -894,7 +894,7 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC
|
||||
* previous {@code keyCode} to generate a unicode combined character.
|
||||
*/
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(@NonNull KeyEvent event) {
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
|
||||
// Tell Android to start tracking this event.
|
||||
getKeyDispatcherState().startTracking(event, this);
|
||||
@@ -1003,7 +1003,6 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC
|
||||
* @return The view matching the accessibility id if any.
|
||||
*/
|
||||
@SuppressLint("SoonBlockedPrivateApi")
|
||||
@Nullable
|
||||
public View findViewByAccessibilityIdTraversal(int accessibilityId) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
return findViewByAccessibilityIdRootedAtCurrentView(accessibilityId, this);
|
||||
@@ -1350,7 +1349,7 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC
|
||||
});
|
||||
}
|
||||
|
||||
public void attachOverlaySurfaceToRender(@NonNull FlutterImageView view) {
|
||||
public void attachOverlaySurfaceToRender(FlutterImageView view) {
|
||||
if (flutterEngine != null) {
|
||||
view.attachToRenderer(flutterEngine.getRenderer());
|
||||
}
|
||||
@@ -1451,13 +1450,13 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvideAutofillVirtualStructure(@NonNull ViewStructure structure, int flags) {
|
||||
public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
|
||||
super.onProvideAutofillVirtualStructure(structure, flags);
|
||||
textInputPlugin.onProvideAutofillVirtualStructure(structure, flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void autofill(@NonNull SparseArray<AutofillValue> values) {
|
||||
public void autofill(SparseArray<AutofillValue> values) {
|
||||
textInputPlugin.autofill(values);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,7 @@ public class KeyboardManager {
|
||||
* dispatched to.
|
||||
*/
|
||||
public KeyboardManager(
|
||||
@NonNull View view,
|
||||
@NonNull TextInputPlugin textInputPlugin,
|
||||
@NonNull Responder[] responders) {
|
||||
View view, @NonNull TextInputPlugin textInputPlugin, Responder[] responders) {
|
||||
this.view = view;
|
||||
this.textInputPlugin = textInputPlugin;
|
||||
this.responders = responders;
|
||||
@@ -105,7 +103,7 @@ public class KeyboardManager {
|
||||
*/
|
||||
interface Responder {
|
||||
interface OnKeyEventHandledCallback {
|
||||
void onKeyEventHandled(boolean canHandleEvent);
|
||||
void onKeyEventHandled(Boolean canHandleEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +122,7 @@ public class KeyboardManager {
|
||||
boolean isCalled = false;
|
||||
|
||||
@Override
|
||||
public void onKeyEventHandled(boolean canHandleEvent) {
|
||||
public void onKeyEventHandled(Boolean canHandleEvent) {
|
||||
if (isCalled) {
|
||||
throw new IllegalStateException(
|
||||
"The onKeyEventHandledCallback should be called exactly once.");
|
||||
@@ -142,7 +140,7 @@ public class KeyboardManager {
|
||||
this.keyEvent = keyEvent;
|
||||
}
|
||||
|
||||
final KeyEvent keyEvent;
|
||||
@NonNull final KeyEvent keyEvent;
|
||||
int unrepliedCount = responders.length;
|
||||
boolean isEventHandled = false;
|
||||
|
||||
@@ -151,9 +149,9 @@ public class KeyboardManager {
|
||||
}
|
||||
}
|
||||
|
||||
protected final Responder[] responders;
|
||||
private final HashSet<KeyEvent> redispatchedEvents = new HashSet<>();
|
||||
private final TextInputPlugin textInputPlugin;
|
||||
@NonNull protected final Responder[] responders;
|
||||
@NonNull private final HashSet<KeyEvent> redispatchedEvents = new HashSet<>();
|
||||
@NonNull private final TextInputPlugin textInputPlugin;
|
||||
private final View view;
|
||||
|
||||
public boolean handleEvent(@NonNull KeyEvent keyEvent) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package io.flutter.embedding.android;
|
||||
|
||||
import android.util.LongSparseArray;
|
||||
import android.view.MotionEvent;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.util.PriorityQueue;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -19,12 +18,10 @@ public final class MotionEventTracker {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static MotionEventId from(long id) {
|
||||
return new MotionEventId(id);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static MotionEventId createUnique() {
|
||||
return MotionEventId.from(ID_COUNTER.incrementAndGet());
|
||||
}
|
||||
@@ -38,7 +35,6 @@ public final class MotionEventTracker {
|
||||
private final PriorityQueue<Long> unusedEvents;
|
||||
private static MotionEventTracker INSTANCE;
|
||||
|
||||
@NonNull
|
||||
public static MotionEventTracker getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new MotionEventTracker();
|
||||
@@ -52,8 +48,7 @@ public final class MotionEventTracker {
|
||||
}
|
||||
|
||||
/** Tracks the event and returns a unique MotionEventId identifying the event. */
|
||||
@NonNull
|
||||
public MotionEventId track(@NonNull MotionEvent event) {
|
||||
public MotionEventId track(MotionEvent event) {
|
||||
MotionEventId eventId = MotionEventId.createUnique();
|
||||
eventById.put(eventId.id, MotionEvent.obtain(event));
|
||||
unusedEvents.add(eventId.id);
|
||||
@@ -66,7 +61,7 @@ public final class MotionEventTracker {
|
||||
* popped or discarded.
|
||||
*/
|
||||
@Nullable
|
||||
public MotionEvent pop(@NonNull MotionEventId eventId) {
|
||||
public MotionEvent pop(MotionEventId eventId) {
|
||||
// remove all the older events.
|
||||
while (!unusedEvents.isEmpty() && unusedEvents.peek() < eventId.id) {
|
||||
eventById.remove(unusedEvents.poll());
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
|
||||
private class FeatureInstallStateUpdatedListener implements SplitInstallStateUpdatedListener {
|
||||
@SuppressLint("DefaultLocale")
|
||||
public void onStateUpdate(@NonNull SplitInstallSessionState state) {
|
||||
public void onStateUpdate(SplitInstallSessionState state) {
|
||||
int sessionId = state.sessionId();
|
||||
if (sessionIdToName.get(sessionId) != null) {
|
||||
switch (state.status()) {
|
||||
@@ -231,7 +231,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setDeferredComponentChannel(@NonNull DeferredComponentChannel channel) {
|
||||
public void setDeferredComponentChannel(DeferredComponentChannel channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
}
|
||||
}
|
||||
|
||||
public void installDeferredComponent(int loadingUnitId, @Nullable String componentName) {
|
||||
public void installDeferredComponent(int loadingUnitId, String componentName) {
|
||||
String resolvedComponentName =
|
||||
componentName != null ? componentName : loadingUnitIdToComponentNames.get(loadingUnitId);
|
||||
if (resolvedComponentName == null) {
|
||||
@@ -357,9 +357,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public String getDeferredComponentInstallState(
|
||||
int loadingUnitId, @Nullable String componentName) {
|
||||
public String getDeferredComponentInstallState(int loadingUnitId, String componentName) {
|
||||
String resolvedComponentName =
|
||||
componentName != null ? componentName : loadingUnitIdToComponentNames.get(loadingUnitId);
|
||||
if (resolvedComponentName == null) {
|
||||
@@ -377,7 +375,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
return sessionIdToState.get(sessionId);
|
||||
}
|
||||
|
||||
public void loadAssets(int loadingUnitId, @NonNull String componentName) {
|
||||
public void loadAssets(int loadingUnitId, String componentName) {
|
||||
if (!verifyJNI()) {
|
||||
return;
|
||||
}
|
||||
@@ -395,7 +393,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
}
|
||||
}
|
||||
|
||||
public void loadDartLibrary(int loadingUnitId, @NonNull String componentName) {
|
||||
public void loadDartLibrary(int loadingUnitId, String componentName) {
|
||||
if (!verifyJNI()) {
|
||||
return;
|
||||
}
|
||||
@@ -480,7 +478,7 @@ public class PlayStoreDeferredComponentManager implements DeferredComponentManag
|
||||
loadingUnitId, searchPaths.toArray(new String[searchPaths.size()]));
|
||||
}
|
||||
|
||||
public boolean uninstallDeferredComponent(int loadingUnitId, @Nullable String componentName) {
|
||||
public boolean uninstallDeferredComponent(int loadingUnitId, String componentName) {
|
||||
String resolvedComponentName =
|
||||
componentName != null ? componentName : loadingUnitIdToComponentNames.get(loadingUnitId);
|
||||
if (resolvedComponentName == null) {
|
||||
|
||||
@@ -48,8 +48,7 @@ public class ShimPluginRegistry implements PluginRegistry {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Registrar registrarFor(@NonNull String pluginKey) {
|
||||
public Registrar registrarFor(String pluginKey) {
|
||||
Log.v(TAG, "Creating plugin Registrar for '" + pluginKey + "'");
|
||||
if (pluginMap.containsKey(pluginKey)) {
|
||||
throw new IllegalStateException("Plugin key " + pluginKey + " is already in use");
|
||||
@@ -61,13 +60,13 @@ public class ShimPluginRegistry implements PluginRegistry {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPlugin(@NonNull String pluginKey) {
|
||||
public boolean hasPlugin(String pluginKey) {
|
||||
return pluginMap.containsKey(pluginKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T valuePublishedByPlugin(@NonNull String pluginKey) {
|
||||
public <T> T valuePublishedByPlugin(String pluginKey) {
|
||||
return (T) pluginMap.get(pluginKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class SurfaceTextureWrapper {
|
||||
|
||||
// Called by native.
|
||||
@SuppressWarnings("unused")
|
||||
public void getTransformMatrix(@NonNull float[] mtx) {
|
||||
public void getTransformMatrix(float[] mtx) {
|
||||
surfaceTexture.getTransformMatrix(mtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,6 @@ public class LocalizationChannel {
|
||||
* The Flutter application would like to obtain the string resource of given {@code key} in
|
||||
* {@code locale}.
|
||||
*/
|
||||
@NonNull
|
||||
String getStringResource(@NonNull String key, @NonNull String locale);
|
||||
String getStringResource(@NonNull String key, String locale);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
package io.flutter.embedding.engine.systemchannels;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import io.flutter.Log;
|
||||
import io.flutter.embedding.engine.dart.DartExecutor;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
@@ -73,13 +72,12 @@ public class RestorationChannel {
|
||||
private boolean frameworkHasRequestedData = false;
|
||||
|
||||
/** Obtain the most current restoration data that the framework has provided. */
|
||||
@Nullable
|
||||
public byte[] getRestorationData() {
|
||||
return restorationData;
|
||||
}
|
||||
|
||||
/** Set the restoration data from which the framework will restore its state. */
|
||||
public void setRestorationData(@NonNull byte[] data) {
|
||||
public void setRestorationData(byte[] data) {
|
||||
engineHasProvidedData = true;
|
||||
if (pendingFrameworkRestorationChannelRequest != null) {
|
||||
// If their is a pending request from the framework, answer it.
|
||||
|
||||
@@ -205,7 +205,7 @@ public class TextInputChannel {
|
||||
*/
|
||||
public void updateEditingState(
|
||||
int inputClientId,
|
||||
@NonNull String text,
|
||||
String text,
|
||||
int selectionStart,
|
||||
int selectionEnd,
|
||||
int composingStart,
|
||||
@@ -235,7 +235,7 @@ public class TextInputChannel {
|
||||
}
|
||||
|
||||
public void updateEditingStateWithDeltas(
|
||||
int inputClientId, @NonNull ArrayList<TextEditingDelta> batchDeltas) {
|
||||
int inputClientId, ArrayList<TextEditingDelta> batchDeltas) {
|
||||
|
||||
Log.v(
|
||||
TAG,
|
||||
@@ -250,7 +250,7 @@ public class TextInputChannel {
|
||||
}
|
||||
|
||||
public void updateEditingStateWithTag(
|
||||
int inputClientId, @NonNull HashMap<String, TextEditState> editStates) {
|
||||
int inputClientId, HashMap<String, TextEditState> editStates) {
|
||||
Log.v(
|
||||
TAG,
|
||||
"Sending message to update editing state for "
|
||||
@@ -325,8 +325,7 @@ public class TextInputChannel {
|
||||
Arrays.asList(inputClientId, "TextInputAction.unspecified"));
|
||||
}
|
||||
|
||||
public void performPrivateCommand(
|
||||
int inputClientId, @NonNull String action, @NonNull Bundle data) {
|
||||
public void performPrivateCommand(int inputClientId, String action, Bundle data) {
|
||||
HashMap<Object, Object> json = new HashMap<>();
|
||||
json.put("action", action);
|
||||
if (data != null) {
|
||||
@@ -416,7 +415,7 @@ public class TextInputChannel {
|
||||
* @param transform a 4x4 matrix that maps the local paint coordinate system to coordinate
|
||||
* system of the FlutterView that owns the current client.
|
||||
*/
|
||||
void setEditableSizeAndTransform(double width, double height, @NonNull double[] transform);
|
||||
void setEditableSizeAndTransform(double width, double height, double[] transform);
|
||||
|
||||
// TODO(mattcarroll): javadoc
|
||||
void setEditingState(@NonNull TextEditState editingState);
|
||||
@@ -433,12 +432,11 @@ public class TextInputChannel {
|
||||
* commands.
|
||||
* @param data Any data to include with the command.
|
||||
*/
|
||||
void sendAppPrivateCommand(@NonNull String action, @NonNull Bundle data);
|
||||
void sendAppPrivateCommand(String action, Bundle data);
|
||||
}
|
||||
|
||||
/** A text editing configuration. */
|
||||
public static class Configuration {
|
||||
@NonNull
|
||||
public static Configuration fromJson(@NonNull JSONObject json)
|
||||
throws JSONException, NoSuchFieldException {
|
||||
final String inputActionName = json.getString("inputAction");
|
||||
@@ -496,7 +494,6 @@ public class TextInputChannel {
|
||||
}
|
||||
|
||||
public static class Autofill {
|
||||
@NonNull
|
||||
public static Autofill fromJson(@NonNull JSONObject json)
|
||||
throws JSONException, NoSuchFieldException {
|
||||
final String uniqueIdentifier = json.getString("uniqueIdentifier");
|
||||
@@ -732,7 +729,6 @@ public class TextInputChannel {
|
||||
|
||||
/** State of an on-going text editing session. */
|
||||
public static class TextEditState {
|
||||
@NonNull
|
||||
public static TextEditState fromJson(@NonNull JSONObject textEditState) throws JSONException {
|
||||
return new TextEditState(
|
||||
textEditState.getString("text"),
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -29,8 +28,7 @@ public final class JSONMessageCodec implements MessageCodec<Object> {
|
||||
private JSONMessageCodec() {}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ByteBuffer encodeMessage(@Nullable Object message) {
|
||||
public ByteBuffer encodeMessage(Object message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -43,8 +41,7 @@ public final class JSONMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object decodeMessage(@Nullable ByteBuffer message) {
|
||||
public Object decodeMessage(ByteBuffer message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@@ -28,8 +26,7 @@ public final class JSONMethodCodec implements MethodCodec {
|
||||
private JSONMethodCodec() {}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeMethodCall(@NonNull MethodCall methodCall) {
|
||||
public ByteBuffer encodeMethodCall(MethodCall methodCall) {
|
||||
try {
|
||||
final JSONObject map = new JSONObject();
|
||||
map.put("method", methodCall.method);
|
||||
@@ -41,8 +38,7 @@ public final class JSONMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public MethodCall decodeMethodCall(@NonNull ByteBuffer message) {
|
||||
public MethodCall decodeMethodCall(ByteBuffer message) {
|
||||
try {
|
||||
final Object json = JSONMessageCodec.INSTANCE.decodeMessage(message);
|
||||
if (json instanceof JSONObject) {
|
||||
@@ -60,15 +56,13 @@ public final class JSONMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeSuccessEnvelope(@Nullable Object result) {
|
||||
public ByteBuffer encodeSuccessEnvelope(Object result) {
|
||||
return JSONMessageCodec.INSTANCE.encodeMessage(new JSONArray().put(JSONUtil.wrap(result)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeErrorEnvelope(
|
||||
@NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails) {
|
||||
String errorCode, String errorMessage, Object errorDetails) {
|
||||
return JSONMessageCodec.INSTANCE.encodeMessage(
|
||||
new JSONArray()
|
||||
.put(errorCode)
|
||||
@@ -77,12 +71,8 @@ public final class JSONMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeErrorEnvelopeWithStacktrace(
|
||||
@NonNull String errorCode,
|
||||
@Nullable String errorMessage,
|
||||
@Nullable Object errorDetails,
|
||||
@Nullable String errorStacktrace) {
|
||||
String errorCode, String errorMessage, Object errorDetails, String errorStacktrace) {
|
||||
return JSONMessageCodec.INSTANCE.encodeMessage(
|
||||
new JSONArray()
|
||||
.put(errorCode)
|
||||
@@ -92,8 +82,7 @@ public final class JSONMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Object decodeEnvelope(@NonNull ByteBuffer envelope) {
|
||||
public Object decodeEnvelope(ByteBuffer envelope) {
|
||||
try {
|
||||
final Object json = JSONMessageCodec.INSTANCE.decodeMessage(envelope);
|
||||
if (json instanceof JSONArray) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -18,8 +17,7 @@ public class JSONUtil {
|
||||
* Convert the Json java representation to Java objects. Particularly used for converting
|
||||
* JSONArray and JSONObject to Lists and Maps.
|
||||
*/
|
||||
@Nullable
|
||||
public static Object unwrap(@Nullable Object o) {
|
||||
public static Object unwrap(Object o) {
|
||||
if (JSONObject.NULL.equals(o) || o == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -59,8 +57,7 @@ public class JSONUtil {
|
||||
}
|
||||
|
||||
/** Backport of {@link JSONObject#wrap(Object)} for use on pre-KitKat systems. */
|
||||
@Nullable
|
||||
public static Object wrap(@Nullable Object o) {
|
||||
public static Object wrap(Object o) {
|
||||
if (o == null) {
|
||||
return JSONObject.NULL;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import io.flutter.BuildConfig;
|
||||
import java.util.Map;
|
||||
@@ -28,10 +27,9 @@ public final class MethodCall {
|
||||
* Creates a {@link MethodCall} with the specified method name and arguments.
|
||||
*
|
||||
* @param method the method name String, not null.
|
||||
* @param arguments the arguments, a value supported by the channel's message codec. Possibly,
|
||||
* null.
|
||||
* @param arguments the arguments, a value supported by the channel's message codec.
|
||||
*/
|
||||
public MethodCall(@NonNull String method, @Nullable Object arguments) {
|
||||
public MethodCall(String method, Object arguments) {
|
||||
if (BuildConfig.DEBUG && method == null) {
|
||||
throw new AssertionError("Parameter method must not be null.");
|
||||
}
|
||||
@@ -46,7 +44,6 @@ public final class MethodCall {
|
||||
* @return the arguments with static type T
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> T arguments() {
|
||||
return (T) arguments;
|
||||
}
|
||||
@@ -65,7 +62,7 @@ public final class MethodCall {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> T argument(@NonNull String key) {
|
||||
public <T> T argument(String key) {
|
||||
if (arguments == null) {
|
||||
return null;
|
||||
} else if (arguments instanceof Map) {
|
||||
@@ -88,7 +85,7 @@ public final class MethodCall {
|
||||
* @throws ClassCastException if {@link #arguments} can be cast to neither {@link Map} nor {@link
|
||||
* JSONObject}.
|
||||
*/
|
||||
public boolean hasArgument(@NonNull String key) {
|
||||
public boolean hasArgument(String key) {
|
||||
if (arguments == null) {
|
||||
return false;
|
||||
} else if (arguments instanceof Map) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MethodChannel {
|
||||
* @param messenger a {@link BinaryMessenger}.
|
||||
* @param name a channel name String.
|
||||
*/
|
||||
public MethodChannel(@NonNull BinaryMessenger messenger, @NonNull String name) {
|
||||
public MethodChannel(BinaryMessenger messenger, String name) {
|
||||
this(messenger, name, StandardMethodCodec.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -56,8 +56,7 @@ public class MethodChannel {
|
||||
* @param name a channel name String.
|
||||
* @param codec a {@link MessageCodec}.
|
||||
*/
|
||||
public MethodChannel(
|
||||
@NonNull BinaryMessenger messenger, @NonNull String name, @NonNull MethodCodec codec) {
|
||||
public MethodChannel(BinaryMessenger messenger, String name, MethodCodec codec) {
|
||||
this(messenger, name, codec, null);
|
||||
}
|
||||
|
||||
@@ -73,9 +72,9 @@ public class MethodChannel {
|
||||
* BinaryMessenger#makeBackgroundTaskQueue()}.
|
||||
*/
|
||||
public MethodChannel(
|
||||
@NonNull BinaryMessenger messenger,
|
||||
@NonNull String name,
|
||||
@NonNull MethodCodec codec,
|
||||
BinaryMessenger messenger,
|
||||
String name,
|
||||
MethodCodec codec,
|
||||
@Nullable BinaryMessenger.TaskQueue taskQueue) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
if (messenger == null) {
|
||||
@@ -115,8 +114,7 @@ public class MethodChannel {
|
||||
* @param callback a {@link Result} callback for the invocation result, or null.
|
||||
*/
|
||||
@UiThread
|
||||
public void invokeMethod(
|
||||
@NonNull String method, @Nullable Object arguments, @Nullable Result callback) {
|
||||
public void invokeMethod(String method, @Nullable Object arguments, @Nullable Result callback) {
|
||||
messenger.send(
|
||||
name,
|
||||
codec.encodeMethodCall(new MethodCall(method, arguments)),
|
||||
@@ -214,8 +212,7 @@ public class MethodChannel {
|
||||
* supported by the codec. For instance, if you are using {@link StandardMessageCodec}
|
||||
* (default), please see its documentation on what types are supported.
|
||||
*/
|
||||
void error(
|
||||
@NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails);
|
||||
void error(String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails);
|
||||
|
||||
/** Handles a call to an unimplemented method. */
|
||||
void notImplemented();
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
@@ -25,8 +23,7 @@ public interface MethodCodec {
|
||||
* @return a {@link ByteBuffer} containing the encoding between position 0 and the current
|
||||
* position.
|
||||
*/
|
||||
@NonNull
|
||||
ByteBuffer encodeMethodCall(@NonNull MethodCall methodCall);
|
||||
ByteBuffer encodeMethodCall(MethodCall methodCall);
|
||||
|
||||
/**
|
||||
* Decodes a message call from binary.
|
||||
@@ -35,8 +32,7 @@ public interface MethodCodec {
|
||||
* @return a {@link MethodCall} representation of the bytes between the given buffer's current
|
||||
* position and its limit.
|
||||
*/
|
||||
@NonNull
|
||||
MethodCall decodeMethodCall(@NonNull ByteBuffer methodCall);
|
||||
MethodCall decodeMethodCall(ByteBuffer methodCall);
|
||||
|
||||
/**
|
||||
* Encodes a successful result into a binary envelope message.
|
||||
@@ -45,8 +41,7 @@ public interface MethodCodec {
|
||||
* @return a {@link ByteBuffer} containing the encoding between position 0 and the current
|
||||
* position.
|
||||
*/
|
||||
@NonNull
|
||||
ByteBuffer encodeSuccessEnvelope(@Nullable Object result);
|
||||
ByteBuffer encodeSuccessEnvelope(Object result);
|
||||
|
||||
/**
|
||||
* Encodes an error result into a binary envelope message.
|
||||
@@ -58,9 +53,7 @@ public interface MethodCodec {
|
||||
* @return a {@link ByteBuffer} containing the encoding between position 0 and the current
|
||||
* position.
|
||||
*/
|
||||
@NonNull
|
||||
ByteBuffer encodeErrorEnvelope(
|
||||
@NonNull String errorCode, @Nullable String errorMessage, @Nullable Object errorDetails);
|
||||
ByteBuffer encodeErrorEnvelope(String errorCode, String errorMessage, Object errorDetails);
|
||||
|
||||
/**
|
||||
* Encodes an error result into a binary envelope message with the native stacktrace.
|
||||
@@ -73,12 +66,8 @@ public interface MethodCodec {
|
||||
* @return a {@link ByteBuffer} containing the encoding between position 0 and the current
|
||||
* position.
|
||||
*/
|
||||
@NonNull
|
||||
ByteBuffer encodeErrorEnvelopeWithStacktrace(
|
||||
@NonNull String errorCode,
|
||||
@Nullable String errorMessage,
|
||||
@Nullable Object errorDetails,
|
||||
@Nullable String errorStacktrace);
|
||||
String errorCode, String errorMessage, Object errorDetails, String errorStacktrace);
|
||||
|
||||
/**
|
||||
* Decodes a result envelope from binary.
|
||||
@@ -87,6 +76,5 @@ public interface MethodCodec {
|
||||
* @return the enveloped result Object.
|
||||
* @throws FlutterException if the envelope was an error envelope.
|
||||
*/
|
||||
@NonNull
|
||||
Object decodeEnvelope(@NonNull ByteBuffer envelope);
|
||||
Object decodeEnvelope(ByteBuffer envelope);
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ package io.flutter.plugin.common;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
|
||||
@@ -38,8 +36,7 @@ public interface PluginRegistry {
|
||||
* @deprecated See https://flutter.dev/go/android-project-migration for migration details.
|
||||
*/
|
||||
@Deprecated
|
||||
@NonNull
|
||||
Registrar registrarFor(@NonNull String pluginKey);
|
||||
Registrar registrarFor(String pluginKey);
|
||||
|
||||
/**
|
||||
* Returns whether the specified plugin is known to this registry.
|
||||
@@ -50,7 +47,7 @@ public interface PluginRegistry {
|
||||
* @deprecated See https://flutter.dev/go/android-project-migration for migration details.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean hasPlugin(@NonNull String pluginKey);
|
||||
boolean hasPlugin(String pluginKey);
|
||||
|
||||
/**
|
||||
* Returns the value published by the specified plugin, if any.
|
||||
@@ -66,8 +63,7 @@ public interface PluginRegistry {
|
||||
* @deprecated See https://flutter.dev/go/android-project-migration for migration details.
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
<T> T valuePublishedByPlugin(@NonNull String pluginKey);
|
||||
<T> T valuePublishedByPlugin(String pluginKey);
|
||||
|
||||
/**
|
||||
* Receiver of registrations from a single plugin.
|
||||
@@ -99,7 +95,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@Nullable
|
||||
Activity activity();
|
||||
|
||||
/**
|
||||
@@ -112,7 +107,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@NonNull
|
||||
Context context();
|
||||
|
||||
/**
|
||||
@@ -128,7 +122,6 @@ public interface PluginRegistry {
|
||||
* @return the current {@link #activity() Activity}, if not null, otherwise the {@link
|
||||
* #context() Application}.
|
||||
*/
|
||||
@NonNull
|
||||
Context activeContext();
|
||||
|
||||
/**
|
||||
@@ -142,7 +135,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@NonNull
|
||||
BinaryMessenger messenger();
|
||||
|
||||
/**
|
||||
@@ -155,7 +147,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@NonNull
|
||||
TextureRegistry textures();
|
||||
|
||||
/**
|
||||
@@ -170,7 +161,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@NonNull
|
||||
PlatformViewRegistry platformViewRegistry();
|
||||
|
||||
/**
|
||||
@@ -186,7 +176,6 @@ public interface PluginRegistry {
|
||||
* <p>For instructions on migrating a plugin from Flutter's v1 Android embedding to v2, visit
|
||||
* http://flutter.dev/go/android-plugin-migration
|
||||
*/
|
||||
@NonNull
|
||||
FlutterView view();
|
||||
|
||||
/**
|
||||
@@ -198,8 +187,7 @@ public interface PluginRegistry {
|
||||
* @param asset the name of the asset. The name can be hierarchical
|
||||
* @return the filename to be used with {@link android.content.res.AssetManager}
|
||||
*/
|
||||
@NonNull
|
||||
String lookupKeyForAsset(@NonNull String asset);
|
||||
String lookupKeyForAsset(String asset);
|
||||
|
||||
/**
|
||||
* Returns the file name for the given asset which originates from the specified packageName.
|
||||
@@ -212,8 +200,7 @@ public interface PluginRegistry {
|
||||
* @param packageName the name of the package from which the asset originates
|
||||
* @return the file name to be used with {@link android.content.res.AssetManager}
|
||||
*/
|
||||
@NonNull
|
||||
String lookupKeyForAsset(@NonNull String asset, @NonNull String packageName);
|
||||
String lookupKeyForAsset(String asset, String packageName);
|
||||
|
||||
/**
|
||||
* Publishes a value associated with the plugin being registered.
|
||||
@@ -235,8 +222,7 @@ public interface PluginRegistry {
|
||||
* @param value the value, possibly null.
|
||||
* @return this {@link Registrar}.
|
||||
*/
|
||||
@NonNull
|
||||
Registrar publish(@Nullable Object value);
|
||||
Registrar publish(Object value);
|
||||
|
||||
/**
|
||||
* Adds a callback allowing the plugin to take part in handling incoming calls to {@code
|
||||
@@ -254,9 +240,7 @@ public interface PluginRegistry {
|
||||
* @param listener a {@link RequestPermissionsResultListener} callback.
|
||||
* @return this {@link Registrar}.
|
||||
*/
|
||||
@NonNull
|
||||
Registrar addRequestPermissionsResultListener(
|
||||
@NonNull RequestPermissionsResultListener listener);
|
||||
Registrar addRequestPermissionsResultListener(RequestPermissionsResultListener listener);
|
||||
|
||||
/**
|
||||
* Adds a callback allowing the plugin to take part in handling incoming calls to {@link
|
||||
@@ -272,8 +256,7 @@ public interface PluginRegistry {
|
||||
* @param listener an {@link ActivityResultListener} callback.
|
||||
* @return this {@link Registrar}.
|
||||
*/
|
||||
@NonNull
|
||||
Registrar addActivityResultListener(@NonNull ActivityResultListener listener);
|
||||
Registrar addActivityResultListener(ActivityResultListener listener);
|
||||
|
||||
/**
|
||||
* Adds a callback allowing the plugin to take part in handling incoming calls to {@link
|
||||
@@ -289,8 +272,7 @@ public interface PluginRegistry {
|
||||
* @param listener a {@link NewIntentListener} callback.
|
||||
* @return this {@link Registrar}.
|
||||
*/
|
||||
@NonNull
|
||||
Registrar addNewIntentListener(@NonNull NewIntentListener listener);
|
||||
Registrar addNewIntentListener(NewIntentListener listener);
|
||||
|
||||
/**
|
||||
* Adds a callback allowing the plugin to take part in handling incoming calls to {@link
|
||||
@@ -306,8 +288,7 @@ public interface PluginRegistry {
|
||||
* @param listener a {@link UserLeaveHintListener} callback.
|
||||
* @return this {@link Registrar}.
|
||||
*/
|
||||
@NonNull
|
||||
Registrar addUserLeaveHintListener(@NonNull UserLeaveHintListener listener);
|
||||
Registrar addUserLeaveHintListener(UserLeaveHintListener listener);
|
||||
|
||||
/**
|
||||
* Adds a callback allowing the plugin to take part in handling incoming calls to {@link
|
||||
@@ -331,8 +312,7 @@ public interface PluginRegistry {
|
||||
*/
|
||||
// TODO(amirh): Add a line in the javadoc above that points to a Platform Views website guide
|
||||
// when one is available (but not a website API doc)
|
||||
@NonNull
|
||||
Registrar addViewDestroyListener(@NonNull ViewDestroyListener listener);
|
||||
Registrar addViewDestroyListener(ViewDestroyListener listener);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,8 +328,7 @@ public interface PluginRegistry {
|
||||
* {@code PackageManager.PERMISSION_GRANTED} or {@code PackageManager.PERMISSION_DENIED}.
|
||||
* @return true if the result has been handled.
|
||||
*/
|
||||
boolean onRequestPermissionsResult(
|
||||
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults);
|
||||
boolean onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,7 +345,7 @@ public interface PluginRegistry {
|
||||
* attached to Intent "extras").
|
||||
* @return true if the result has been handled.
|
||||
*/
|
||||
boolean onActivityResult(int requestCode, int resultCode, @NonNull Intent data);
|
||||
boolean onActivityResult(int requestCode, int resultCode, Intent data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +356,7 @@ public interface PluginRegistry {
|
||||
* @param intent The new intent that was started for the activity.
|
||||
* @return true if the new intent has been handled.
|
||||
*/
|
||||
boolean onNewIntent(@NonNull Intent intent);
|
||||
boolean onNewIntent(Intent intent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -397,7 +376,7 @@ public interface PluginRegistry {
|
||||
*/
|
||||
@Deprecated
|
||||
interface ViewDestroyListener {
|
||||
boolean onViewDestroy(@NonNull FlutterNativeView view);
|
||||
boolean onViewDestroy(FlutterNativeView view);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,6 +389,6 @@ public interface PluginRegistry {
|
||||
*/
|
||||
@Deprecated
|
||||
interface PluginRegistrantCallback {
|
||||
void registerWith(@NonNull PluginRegistry registry);
|
||||
void registerWith(PluginRegistry registry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import io.flutter.BuildConfig;
|
||||
import io.flutter.Log;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -67,8 +65,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
public static final StandardMessageCodec INSTANCE = new StandardMessageCodec();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ByteBuffer encodeMessage(@Nullable Object message) {
|
||||
public ByteBuffer encodeMessage(Object message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -80,8 +77,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object decodeMessage(@Nullable ByteBuffer message) {
|
||||
public Object decodeMessage(ByteBuffer message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -115,7 +111,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
* Writes an int representing a size to the specified stream. Uses an expanding code of 1 to 5
|
||||
* bytes to optimize for small values.
|
||||
*/
|
||||
protected static final void writeSize(@NonNull ByteArrayOutputStream stream, int value) {
|
||||
protected static final void writeSize(ByteArrayOutputStream stream, int value) {
|
||||
if (BuildConfig.DEBUG && 0 > value) {
|
||||
Log.e(TAG, "Attempted to write a negative size.");
|
||||
}
|
||||
@@ -131,7 +127,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Writes the least significant two bytes of the specified int to the specified stream. */
|
||||
protected static final void writeChar(@NonNull ByteArrayOutputStream stream, int value) {
|
||||
protected static final void writeChar(ByteArrayOutputStream stream, int value) {
|
||||
if (LITTLE_ENDIAN) {
|
||||
stream.write(value);
|
||||
stream.write(value >>> 8);
|
||||
@@ -142,7 +138,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Writes the specified int as 4 bytes to the specified stream. */
|
||||
protected static final void writeInt(@NonNull ByteArrayOutputStream stream, int value) {
|
||||
protected static final void writeInt(ByteArrayOutputStream stream, int value) {
|
||||
if (LITTLE_ENDIAN) {
|
||||
stream.write(value);
|
||||
stream.write(value >>> 8);
|
||||
@@ -157,7 +153,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Writes the specified long as 8 bytes to the specified stream. */
|
||||
protected static final void writeLong(@NonNull ByteArrayOutputStream stream, long value) {
|
||||
protected static final void writeLong(ByteArrayOutputStream stream, long value) {
|
||||
if (LITTLE_ENDIAN) {
|
||||
stream.write((byte) value);
|
||||
stream.write((byte) (value >>> 8));
|
||||
@@ -180,18 +176,17 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Writes the specified double as 4 bytes to the specified stream */
|
||||
protected static final void writeFloat(@NonNull ByteArrayOutputStream stream, float value) {
|
||||
protected static final void writeFloat(ByteArrayOutputStream stream, float value) {
|
||||
writeInt(stream, Float.floatToIntBits(value));
|
||||
}
|
||||
|
||||
/** Writes the specified double as 8 bytes to the specified stream. */
|
||||
protected static final void writeDouble(@NonNull ByteArrayOutputStream stream, double value) {
|
||||
protected static final void writeDouble(ByteArrayOutputStream stream, double value) {
|
||||
writeLong(stream, Double.doubleToLongBits(value));
|
||||
}
|
||||
|
||||
/** Writes the length and then the actual bytes of the specified array to the specified stream. */
|
||||
protected static final void writeBytes(
|
||||
@NonNull ByteArrayOutputStream stream, @NonNull byte[] bytes) {
|
||||
protected static final void writeBytes(ByteArrayOutputStream stream, byte[] bytes) {
|
||||
writeSize(stream, bytes.length);
|
||||
stream.write(bytes, 0, bytes.length);
|
||||
}
|
||||
@@ -201,7 +196,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
* aligned to a whole multiple of the specified alignment. An example usage with alignment = 8 is
|
||||
* to ensure doubles are word-aligned in the stream.
|
||||
*/
|
||||
protected static final void writeAlignment(@NonNull ByteArrayOutputStream stream, int alignment) {
|
||||
protected static final void writeAlignment(ByteArrayOutputStream stream, int alignment) {
|
||||
final int mod = stream.size() % alignment;
|
||||
if (mod != 0) {
|
||||
for (int i = 0; i < alignment - mod; i++) {
|
||||
@@ -217,7 +212,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
* <p>Subclasses can extend the codec by overriding this method, calling super for values that the
|
||||
* extension does not handle.
|
||||
*/
|
||||
protected void writeValue(@NonNull ByteArrayOutputStream stream, @NonNull Object value) {
|
||||
protected void writeValue(ByteArrayOutputStream stream, Object value) {
|
||||
if (value == null || value.equals(null)) {
|
||||
stream.write(NULL);
|
||||
} else if (value instanceof Boolean) {
|
||||
@@ -299,7 +294,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Reads an int representing a size as written by writeSize. */
|
||||
protected static final int readSize(@NonNull ByteBuffer buffer) {
|
||||
protected static final int readSize(ByteBuffer buffer) {
|
||||
if (!buffer.hasRemaining()) {
|
||||
throw new IllegalArgumentException("Message corrupted");
|
||||
}
|
||||
@@ -314,8 +309,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Reads a byte array as written by writeBytes. */
|
||||
@NonNull
|
||||
protected static final byte[] readBytes(@NonNull ByteBuffer buffer) {
|
||||
protected static final byte[] readBytes(ByteBuffer buffer) {
|
||||
final int length = readSize(buffer);
|
||||
final byte[] bytes = new byte[length];
|
||||
buffer.get(bytes);
|
||||
@@ -323,7 +317,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Reads alignment padding bytes as written by writeAlignment. */
|
||||
protected static final void readAlignment(@NonNull ByteBuffer buffer, int alignment) {
|
||||
protected static final void readAlignment(ByteBuffer buffer, int alignment) {
|
||||
final int mod = buffer.position() % alignment;
|
||||
if (mod != 0) {
|
||||
buffer.position(buffer.position() + alignment - mod);
|
||||
@@ -331,8 +325,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
}
|
||||
|
||||
/** Reads a value as written by writeValue. */
|
||||
@NonNull
|
||||
protected final Object readValue(@NonNull ByteBuffer buffer) {
|
||||
protected final Object readValue(ByteBuffer buffer) {
|
||||
if (!buffer.hasRemaining()) {
|
||||
throw new IllegalArgumentException("Message corrupted");
|
||||
}
|
||||
@@ -346,8 +339,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
|
||||
* <p>Subclasses may extend the codec by overriding this method, calling super for types that the
|
||||
* extension does not handle.
|
||||
*/
|
||||
@Nullable
|
||||
protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) {
|
||||
protected Object readValueOfType(byte type, ByteBuffer buffer) {
|
||||
final Object result;
|
||||
switch (type) {
|
||||
case NULL:
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.plugin.common.StandardMessageCodec.ExposedByteArrayOutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
@@ -28,13 +27,12 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
private final StandardMessageCodec messageCodec;
|
||||
|
||||
/** Creates a new method codec based on the specified message codec. */
|
||||
public StandardMethodCodec(@NonNull StandardMessageCodec messageCodec) {
|
||||
public StandardMethodCodec(StandardMessageCodec messageCodec) {
|
||||
this.messageCodec = messageCodec;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeMethodCall(@NonNull MethodCall methodCall) {
|
||||
public ByteBuffer encodeMethodCall(MethodCall methodCall) {
|
||||
final ExposedByteArrayOutputStream stream = new ExposedByteArrayOutputStream();
|
||||
messageCodec.writeValue(stream, methodCall.method);
|
||||
messageCodec.writeValue(stream, methodCall.arguments);
|
||||
@@ -44,8 +42,7 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public MethodCall decodeMethodCall(@NonNull ByteBuffer methodCall) {
|
||||
public MethodCall decodeMethodCall(ByteBuffer methodCall) {
|
||||
methodCall.order(ByteOrder.nativeOrder());
|
||||
final Object method = messageCodec.readValue(methodCall);
|
||||
final Object arguments = messageCodec.readValue(methodCall);
|
||||
@@ -56,8 +53,7 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeSuccessEnvelope(@NonNull Object result) {
|
||||
public ByteBuffer encodeSuccessEnvelope(Object result) {
|
||||
final ExposedByteArrayOutputStream stream = new ExposedByteArrayOutputStream();
|
||||
stream.write(0);
|
||||
messageCodec.writeValue(stream, result);
|
||||
@@ -67,9 +63,8 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeErrorEnvelope(
|
||||
@NonNull String errorCode, @NonNull String errorMessage, @NonNull Object errorDetails) {
|
||||
String errorCode, String errorMessage, Object errorDetails) {
|
||||
final ExposedByteArrayOutputStream stream = new ExposedByteArrayOutputStream();
|
||||
stream.write(1);
|
||||
messageCodec.writeValue(stream, errorCode);
|
||||
@@ -85,12 +80,8 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ByteBuffer encodeErrorEnvelopeWithStacktrace(
|
||||
@NonNull String errorCode,
|
||||
@NonNull String errorMessage,
|
||||
@NonNull Object errorDetails,
|
||||
@NonNull String errorStacktrace) {
|
||||
String errorCode, String errorMessage, Object errorDetails, String errorStacktrace) {
|
||||
final ExposedByteArrayOutputStream stream = new ExposedByteArrayOutputStream();
|
||||
stream.write(1);
|
||||
messageCodec.writeValue(stream, errorCode);
|
||||
@@ -107,8 +98,7 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Object decodeEnvelope(@NonNull ByteBuffer envelope) {
|
||||
public Object decodeEnvelope(ByteBuffer envelope) {
|
||||
envelope.order(ByteOrder.nativeOrder());
|
||||
final byte flag = envelope.get();
|
||||
switch (flag) {
|
||||
@@ -135,8 +125,7 @@ public final class StandardMethodCodec implements MethodCodec {
|
||||
throw new IllegalArgumentException("Envelope corrupted");
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private static String getStackTrace(@NonNull Throwable t) {
|
||||
private static String getStackTrace(Throwable t) {
|
||||
Writer result = new StringWriter();
|
||||
t.printStackTrace(new PrintWriter(result));
|
||||
return result.toString();
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.common;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@@ -22,8 +21,7 @@ public final class StringCodec implements MessageCodec<String> {
|
||||
private StringCodec() {}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ByteBuffer encodeMessage(@Nullable String message) {
|
||||
public ByteBuffer encodeMessage(String message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -35,8 +33,7 @@ public final class StringCodec implements MessageCodec<String> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String decodeMessage(@Nullable ByteBuffer message) {
|
||||
public String decodeMessage(ByteBuffer message) {
|
||||
if (message == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.editing;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import io.flutter.Log;
|
||||
import org.json.JSONException;
|
||||
@@ -13,8 +12,8 @@ import org.json.JSONObject;
|
||||
/// A representation of the change that occured to an editing state, along with the resulting
|
||||
/// composing and selection regions.
|
||||
public final class TextEditingDelta {
|
||||
private @NonNull CharSequence oldText;
|
||||
private @NonNull CharSequence deltaText;
|
||||
private CharSequence oldText;
|
||||
private CharSequence deltaText;
|
||||
private int deltaStart;
|
||||
private int deltaEnd;
|
||||
private int newSelectionStart;
|
||||
@@ -25,10 +24,10 @@ public final class TextEditingDelta {
|
||||
private static final String TAG = "TextEditingDelta";
|
||||
|
||||
public TextEditingDelta(
|
||||
@NonNull CharSequence oldEditable,
|
||||
CharSequence oldEditable,
|
||||
int replacementDestinationStart,
|
||||
int replacementDestinationEnd,
|
||||
@NonNull CharSequence replacementSource,
|
||||
CharSequence replacementSource,
|
||||
int selectionStart,
|
||||
int selectionEnd,
|
||||
int composingStart,
|
||||
@@ -47,7 +46,7 @@ public final class TextEditingDelta {
|
||||
|
||||
// Non text update delta constructor.
|
||||
public TextEditingDelta(
|
||||
@NonNull CharSequence oldText,
|
||||
CharSequence oldText,
|
||||
int selectionStart,
|
||||
int selectionEnd,
|
||||
int composingStart,
|
||||
@@ -61,13 +60,11 @@ public final class TextEditingDelta {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@NonNull
|
||||
public CharSequence getOldText() {
|
||||
return oldText;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@NonNull
|
||||
public CharSequence getDeltaText() {
|
||||
return deltaText;
|
||||
}
|
||||
@@ -102,15 +99,13 @@ public final class TextEditingDelta {
|
||||
return newComposingEnd;
|
||||
}
|
||||
|
||||
private void setDeltas(
|
||||
@NonNull CharSequence oldText, @NonNull CharSequence newText, int newStart, int newExtent) {
|
||||
private void setDeltas(CharSequence oldText, CharSequence newText, int newStart, int newExtent) {
|
||||
this.oldText = oldText;
|
||||
deltaText = newText;
|
||||
deltaStart = newStart;
|
||||
deltaEnd = newExtent;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public JSONObject toJSON() {
|
||||
JSONObject delta = new JSONObject();
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public TextInputPlugin(
|
||||
@NonNull View view,
|
||||
View view,
|
||||
@NonNull TextInputChannel textInputChannel,
|
||||
@NonNull PlatformViewsController platformViewsController) {
|
||||
mView = view;
|
||||
@@ -285,9 +285,8 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
return textType;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public InputConnection createInputConnection(
|
||||
@NonNull View view, @NonNull KeyboardManager keyboardManager, @NonNull EditorInfo outAttrs) {
|
||||
View view, KeyboardManager keyboardManager, EditorInfo outAttrs) {
|
||||
if (inputTarget.type == InputTarget.Type.NO_TARGET) {
|
||||
lastInputConnection = null;
|
||||
return null;
|
||||
@@ -373,7 +372,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
}
|
||||
}
|
||||
|
||||
public void sendTextInputAppPrivateCommand(@NonNull String action, @NonNull Bundle data) {
|
||||
public void sendTextInputAppPrivateCommand(String action, Bundle data) {
|
||||
mImm.sendAppPrivateCommand(mView, action, data);
|
||||
}
|
||||
|
||||
@@ -594,7 +593,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
}
|
||||
|
||||
// -------- Start: KeyboardManager Synchronous Responder -------
|
||||
public boolean handleKeyEvent(@NonNull KeyEvent keyEvent) {
|
||||
public boolean handleKeyEvent(KeyEvent keyEvent) {
|
||||
if (!getInputMethodManager().isAcceptingText() || lastInputConnection == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -752,7 +751,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
}
|
||||
}
|
||||
|
||||
public void onProvideAutofillVirtualStructure(@NonNull ViewStructure structure, int flags) {
|
||||
public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O || !needsAutofill()) {
|
||||
return;
|
||||
}
|
||||
@@ -796,7 +795,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
|
||||
}
|
||||
}
|
||||
|
||||
public void autofill(@NonNull SparseArray<AutofillValue> values) {
|
||||
public void autofill(SparseArray<AutofillValue> values) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -82,8 +82,7 @@ public class LocalizationPlugin {
|
||||
* <p>FlutterEngine must be non-null when this method is invoked.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nullable
|
||||
public Locale resolveNativeLocale(@Nullable List<Locale> supportedLocales) {
|
||||
public Locale resolveNativeLocale(List<Locale> supportedLocales) {
|
||||
if (supportedLocales == null || supportedLocales.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
@@ -189,8 +188,7 @@ public class LocalizationPlugin {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@NonNull
|
||||
public static Locale localeFromString(@NonNull String localeString) {
|
||||
public static Locale localeFromString(String localeString) {
|
||||
// Use Locale.forLanguageTag if available (API 21+).
|
||||
if (false && Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
|
||||
return Locale.forLanguageTag(localeString);
|
||||
|
||||
@@ -121,7 +121,6 @@ public class MouseCursorPlugin {
|
||||
* <p>This is typically implemented by calling {@link android.view.PointerIcon#getSystemIcon}
|
||||
* with the context associated with this view.
|
||||
*/
|
||||
@NonNull
|
||||
public PointerIcon getSystemPointerIcon(int type);
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,14 +130,12 @@ public class PlatformPlugin {
|
||||
}
|
||||
};
|
||||
|
||||
public PlatformPlugin(@NonNull Activity activity, @NonNull PlatformChannel platformChannel) {
|
||||
public PlatformPlugin(Activity activity, PlatformChannel platformChannel) {
|
||||
this(activity, platformChannel, null);
|
||||
}
|
||||
|
||||
public PlatformPlugin(
|
||||
@NonNull Activity activity,
|
||||
@NonNull PlatformChannel platformChannel,
|
||||
@NonNull PlatformPluginDelegate delegate) {
|
||||
Activity activity, PlatformChannel platformChannel, PlatformPluginDelegate delegate) {
|
||||
this.activity = activity;
|
||||
this.platformChannel = platformChannel;
|
||||
this.platformChannel.setPlatformMessageHandler(mPlatformMessageHandler);
|
||||
@@ -155,7 +153,7 @@ public class PlatformPlugin {
|
||||
this.platformChannel.setPlatformMessageHandler(null);
|
||||
}
|
||||
|
||||
private void playSystemSound(@NonNull PlatformChannel.SoundType soundType) {
|
||||
private void playSystemSound(PlatformChannel.SoundType soundType) {
|
||||
if (soundType == PlatformChannel.SoundType.CLICK) {
|
||||
View view = activity.getWindow().getDecorView();
|
||||
view.playSoundEffect(SoundEffectConstants.CLICK);
|
||||
@@ -163,8 +161,7 @@ public class PlatformPlugin {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
/* package */ void vibrateHapticFeedback(
|
||||
@NonNull PlatformChannel.HapticFeedbackType feedbackType) {
|
||||
/* package */ void vibrateHapticFeedback(PlatformChannel.HapticFeedbackType feedbackType) {
|
||||
View view = activity.getWindow().getDecorView();
|
||||
switch (feedbackType) {
|
||||
case STANDARD:
|
||||
|
||||
@@ -7,12 +7,10 @@ package io.flutter.plugin.platform;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/** A handle to an Android view to be embedded in the Flutter hierarchy. */
|
||||
public interface PlatformView {
|
||||
/** Returns the Android view to be embedded in the Flutter hierarchy. */
|
||||
@Nullable
|
||||
View getView();
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,15 +5,13 @@
|
||||
package io.flutter.plugin.platform;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import io.flutter.plugin.common.MessageCodec;
|
||||
|
||||
public abstract class PlatformViewFactory {
|
||||
private final MessageCodec<Object> createArgsCodec;
|
||||
|
||||
/** @param createArgsCodec the codec used to decode the args parameter of {@link #create}. */
|
||||
public PlatformViewFactory(@NonNull MessageCodec<Object> createArgsCodec) {
|
||||
public PlatformViewFactory(MessageCodec<Object> createArgsCodec) {
|
||||
this.createArgsCodec = createArgsCodec;
|
||||
}
|
||||
|
||||
@@ -27,11 +25,9 @@ public abstract class PlatformViewFactory {
|
||||
* createArgsCodec argument passed to the constructor. This is null if createArgsCodec was
|
||||
* null, or no arguments were sent from the Flutter app.
|
||||
*/
|
||||
@NonNull
|
||||
public abstract PlatformView create(@Nullable Context context, int viewId, @NonNull Object args);
|
||||
public abstract PlatformView create(Context context, int viewId, Object args);
|
||||
|
||||
/** Returns the codec to be used for decoding the args parameter of {@link #create}. */
|
||||
@NonNull
|
||||
public final MessageCodec<Object> getCreateArgsCodec() {
|
||||
return createArgsCodec;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
package io.flutter.plugin.platform;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* Registry for platform view factories.
|
||||
*
|
||||
@@ -20,5 +18,5 @@ public interface PlatformViewRegistry {
|
||||
* @param factory factory for creating platform views of the specified type.
|
||||
* @return true if succeeded, false if a factory is already registered for viewTypeId.
|
||||
*/
|
||||
boolean registerViewFactory(@NonNull String viewTypeId, @NonNull PlatformViewFactory factory);
|
||||
boolean registerViewFactory(String viewTypeId, PlatformViewFactory factory);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
package io.flutter.plugin.platform;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.view.AccessibilityBridge;
|
||||
|
||||
/** Facilitates interaction between the accessibility bridge and embedded platform views. */
|
||||
@@ -14,11 +13,10 @@ public interface PlatformViewsAccessibilityDelegate {
|
||||
* Returns the root of the view hierarchy for the platform view with the requested id, or null if
|
||||
* there is no corresponding view.
|
||||
*/
|
||||
@NonNull
|
||||
View getPlatformViewById(int id);
|
||||
View getPlatformViewById(Integer id);
|
||||
|
||||
/** Returns true if the platform view uses virtual displays. */
|
||||
boolean usesVirtualDisplay(int id);
|
||||
boolean usesVirtualDisplay(Integer id);
|
||||
|
||||
/**
|
||||
* Attaches an accessibility bridge for this platform views accessibility delegate.
|
||||
@@ -26,7 +24,7 @@ public interface PlatformViewsAccessibilityDelegate {
|
||||
* <p>Accessibility events originating in platform views belonging to this delegate will be
|
||||
* delegated to this accessibility bridge.
|
||||
*/
|
||||
void attachAccessibilityBridge(@NonNull AccessibilityBridge accessibilityBridge);
|
||||
void attachAccessibilityBridge(AccessibilityBridge accessibilityBridge);
|
||||
|
||||
/**
|
||||
* Detaches the current accessibility bridge.
|
||||
|
||||
@@ -161,10 +161,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
final FlutterMutatorView parentView = platformViewParent.get(viewId);
|
||||
if (platformView != null) {
|
||||
if (parentView != null) {
|
||||
final View view = platformView.getView();
|
||||
if (view != null) {
|
||||
parentView.removeView(view);
|
||||
}
|
||||
parentView.removeView(platformView.getView());
|
||||
}
|
||||
platformViews.remove(viewId);
|
||||
platformView.dispose();
|
||||
@@ -244,17 +241,9 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
}
|
||||
|
||||
vdControllers.put(request.viewId, vdController);
|
||||
View view = vdController.getView();
|
||||
if (view == null) {
|
||||
throw new IllegalStateException(
|
||||
"Platform view of type "
|
||||
+ request.viewType
|
||||
+ " with id: "
|
||||
+ request.viewId
|
||||
+ " cannot be null at this time");
|
||||
}
|
||||
view.setLayoutDirection(request.direction);
|
||||
contextToPlatformView.put(view.getContext(), view);
|
||||
View platformView = vdController.getView();
|
||||
platformView.setLayoutDirection(request.direction);
|
||||
contextToPlatformView.put(platformView.getContext(), platformView);
|
||||
|
||||
// TODO(amirh): copy accessibility nodes to the FlutterView's accessibility tree.
|
||||
|
||||
@@ -361,17 +350,12 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
public void clearFocus(int viewId) {
|
||||
final PlatformView platformView = platformViews.get(viewId);
|
||||
if (platformView != null) {
|
||||
final View view = platformView.getView();
|
||||
if (view != null) {
|
||||
view.clearFocus();
|
||||
}
|
||||
platformView.getView().clearFocus();
|
||||
return;
|
||||
}
|
||||
ensureValidAndroidVersion(Build.VERSION_CODES.KITKAT_WATCH);
|
||||
final View view = vdControllers.get(viewId).getView();
|
||||
if (view != null) {
|
||||
view.clearFocus();
|
||||
}
|
||||
View view = vdControllers.get(viewId).getView();
|
||||
view.clearFocus();
|
||||
}
|
||||
|
||||
private void ensureValidAndroidVersion(int minSdkVersion) {
|
||||
@@ -391,11 +375,8 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
};
|
||||
|
||||
@VisibleForTesting
|
||||
@NonNull
|
||||
public MotionEvent toMotionEvent(
|
||||
float density,
|
||||
@NonNull PlatformViewsChannel.PlatformViewTouch touch,
|
||||
boolean usingVirtualDiplays) {
|
||||
float density, PlatformViewsChannel.PlatformViewTouch touch, boolean usingVirtualDiplays) {
|
||||
MotionEventTracker.MotionEventId motionEventId =
|
||||
MotionEventTracker.MotionEventId.from(touch.motionEventId);
|
||||
MotionEvent trackedEvent = motionEventTracker.pop(motionEventId);
|
||||
@@ -473,9 +454,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
* @param dartExecutor The dart execution context, which is used to set up a system channel.
|
||||
*/
|
||||
public void attach(
|
||||
@Nullable Context context,
|
||||
@NonNull TextureRegistry textureRegistry,
|
||||
@NonNull DartExecutor dartExecutor) {
|
||||
Context context, TextureRegistry textureRegistry, @NonNull DartExecutor dartExecutor) {
|
||||
if (this.context != null) {
|
||||
throw new AssertionError(
|
||||
"A PlatformViewsController can only be attached to a single output target.\n"
|
||||
@@ -541,7 +520,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachAccessibilityBridge(@NonNull AccessibilityBridge accessibilityBridge) {
|
||||
public void attachAccessibilityBridge(AccessibilityBridge accessibilityBridge) {
|
||||
accessibilityEventsDelegate.setAccessibilityBridge(accessibilityBridge);
|
||||
}
|
||||
|
||||
@@ -559,7 +538,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
* <p>A platform views controller should be attached to a text input plugin whenever it is
|
||||
* possible for the Flutter framework to receive text input.
|
||||
*/
|
||||
public void attachTextInputPlugin(@NonNull TextInputPlugin textInputPlugin) {
|
||||
public void attachTextInputPlugin(TextInputPlugin textInputPlugin) {
|
||||
this.textInputPlugin = textInputPlugin;
|
||||
}
|
||||
|
||||
@@ -591,7 +570,6 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
return platformView.checkInputConnectionProxy(view);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public PlatformViewRegistry getRegistry() {
|
||||
return registry;
|
||||
}
|
||||
@@ -619,8 +597,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View getPlatformViewById(int id) {
|
||||
public View getPlatformViewById(Integer id) {
|
||||
// Hybrid composition.
|
||||
if (platformViews.get(id) != null) {
|
||||
return platformViews.get(id).getView();
|
||||
@@ -633,7 +610,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesVirtualDisplay(int id) {
|
||||
public boolean usesVirtualDisplay(Integer id) {
|
||||
return vdControllers.containsKey(id);
|
||||
}
|
||||
|
||||
@@ -797,7 +774,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
flutterView.addView(parentView);
|
||||
}
|
||||
|
||||
public void attachToFlutterRenderer(@NonNull FlutterRenderer flutterRenderer) {
|
||||
public void attachToFlutterRenderer(FlutterRenderer flutterRenderer) {
|
||||
androidTouchProcessor = new AndroidTouchProcessor(flutterRenderer, /*trackMotionEvents=*/ true);
|
||||
}
|
||||
|
||||
@@ -822,7 +799,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
int height,
|
||||
int viewWidth,
|
||||
int viewHeight,
|
||||
@NonNull FlutterMutatorsStack mutatorsStack) {
|
||||
FlutterMutatorsStack mutatorsStack) {
|
||||
initializeRootImageViewIfNeeded();
|
||||
initializePlatformViewIfNeeded(viewId);
|
||||
|
||||
@@ -961,7 +938,6 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
*/
|
||||
@VisibleForTesting
|
||||
@TargetApi(19)
|
||||
@NonNull
|
||||
public FlutterOverlaySurface createOverlaySurface(@NonNull FlutterImageView imageView) {
|
||||
final int id = nextOverlayLayerId++;
|
||||
overlayLayerViews.put(id, imageView);
|
||||
@@ -976,7 +952,6 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
|
||||
* <p>This member is not intended for public use, and is only visible for testing.
|
||||
*/
|
||||
@TargetApi(19)
|
||||
@NonNull
|
||||
public FlutterOverlaySurface createOverlaySurface() {
|
||||
// Overlay surfaces have the same size as the background surface.
|
||||
//
|
||||
|
||||
@@ -16,7 +16,6 @@ import android.view.Surface;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import io.flutter.view.TextureRegistry;
|
||||
|
||||
@@ -204,7 +203,6 @@ class VirtualDisplayController {
|
||||
presentation.getView().onInputConnectionUnlocked();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public View getView() {
|
||||
if (presentation == null) return null;
|
||||
PlatformView platformView = presentation.getView();
|
||||
|
||||
@@ -6,12 +6,10 @@ package io.flutter.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.NonNull;
|
||||
import java.io.File;
|
||||
|
||||
public final class PathUtils {
|
||||
@NonNull
|
||||
public static String getFilesDir(@NonNull Context applicationContext) {
|
||||
public static String getFilesDir(Context applicationContext) {
|
||||
File filesDir = applicationContext.getFilesDir();
|
||||
if (filesDir == null) {
|
||||
filesDir = new File(getDataDirPath(applicationContext), "files");
|
||||
@@ -19,8 +17,7 @@ public final class PathUtils {
|
||||
return filesDir.getPath();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String getDataDirectory(@NonNull Context applicationContext) {
|
||||
public static String getDataDirectory(Context applicationContext) {
|
||||
final String name = "flutter";
|
||||
File flutterDir = applicationContext.getDir(name, Context.MODE_PRIVATE);
|
||||
if (flutterDir == null) {
|
||||
@@ -29,8 +26,7 @@ public final class PathUtils {
|
||||
return flutterDir.getPath();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String getCacheDirectory(@NonNull Context applicationContext) {
|
||||
public static String getCacheDirectory(Context applicationContext) {
|
||||
File cacheDir;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
cacheDir = applicationContext.getCodeCacheDir();
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public final class ViewUtils {
|
||||
/**
|
||||
@@ -18,8 +17,7 @@ public final class ViewUtils {
|
||||
* <p>This method will recursively traverse up the context chain if it is a {@link ContextWrapper}
|
||||
* until it finds the first instance of the base context that is an {@link Activity}.
|
||||
*/
|
||||
@Nullable
|
||||
public static Activity getActivity(@Nullable Context context) {
|
||||
public static Activity getActivity(Context context) {
|
||||
if (context == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -855,16 +855,13 @@ public class FlutterView extends SurfaceView
|
||||
|
||||
@Override
|
||||
@UiThread
|
||||
public void setMessageHandler(@NonNull String channel, @NonNull BinaryMessageHandler handler) {
|
||||
public void setMessageHandler(String channel, BinaryMessageHandler handler) {
|
||||
mNativeView.setMessageHandler(channel, handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
@UiThread
|
||||
public void setMessageHandler(
|
||||
@NonNull String channel,
|
||||
@NonNull BinaryMessageHandler handler,
|
||||
@NonNull TaskQueue taskQueue) {
|
||||
public void setMessageHandler(String channel, BinaryMessageHandler handler, TaskQueue taskQueue) {
|
||||
mNativeView.setMessageHandler(channel, handler, taskQueue);
|
||||
}
|
||||
|
||||
@@ -874,14 +871,12 @@ public class FlutterView extends SurfaceView
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public TextureRegistry.SurfaceTextureEntry createSurfaceTexture() {
|
||||
final SurfaceTexture surfaceTexture = new SurfaceTexture(0);
|
||||
return registerSurfaceTexture(surfaceTexture);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public TextureRegistry.SurfaceTextureEntry registerSurfaceTexture(
|
||||
@NonNull SurfaceTexture surfaceTexture) {
|
||||
surfaceTexture.detachFromGLContext();
|
||||
|
||||
@@ -19,7 +19,6 @@ public interface TextureRegistry {
|
||||
*
|
||||
* @return A SurfaceTextureEntry.
|
||||
*/
|
||||
@NonNull
|
||||
SurfaceTextureEntry createSurfaceTexture();
|
||||
|
||||
/**
|
||||
@@ -27,13 +26,11 @@ public interface TextureRegistry {
|
||||
*
|
||||
* @return A SurfaceTextureEntry.
|
||||
*/
|
||||
@NonNull
|
||||
SurfaceTextureEntry registerSurfaceTexture(@NonNull SurfaceTexture surfaceTexture);
|
||||
|
||||
/** A registry entry for a managed SurfaceTexture. */
|
||||
interface SurfaceTextureEntry {
|
||||
/** @return The managed SurfaceTexture. */
|
||||
@NonNull
|
||||
SurfaceTexture surfaceTexture();
|
||||
|
||||
/** @return The identity of this SurfaceTexture. */
|
||||
|
||||
@@ -49,7 +49,7 @@ public class VsyncWaiter {
|
||||
private FlutterJNI flutterJNI;
|
||||
|
||||
@NonNull
|
||||
public static VsyncWaiter getInstance(float fps, @NonNull FlutterJNI flutterJNI) {
|
||||
public static VsyncWaiter getInstance(float fps, FlutterJNI flutterJNI) {
|
||||
if (instance == null) {
|
||||
instance = new VsyncWaiter(flutterJNI);
|
||||
}
|
||||
@@ -60,8 +60,7 @@ public class VsyncWaiter {
|
||||
|
||||
@TargetApi(17)
|
||||
@NonNull
|
||||
public static VsyncWaiter getInstance(
|
||||
@NonNull DisplayManager displayManager, @NonNull FlutterJNI flutterJNI) {
|
||||
public static VsyncWaiter getInstance(DisplayManager displayManager, FlutterJNI flutterJNI) {
|
||||
if (instance == null) {
|
||||
instance = new VsyncWaiter(flutterJNI);
|
||||
}
|
||||
@@ -104,7 +103,7 @@ public class VsyncWaiter {
|
||||
}
|
||||
};
|
||||
|
||||
private VsyncWaiter(@NonNull FlutterJNI flutterJNI) {
|
||||
private VsyncWaiter(FlutterJNI flutterJNI) {
|
||||
this.flutterJNI = flutterJNI;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.NonNull;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Locale;
|
||||
@@ -30,7 +29,7 @@ public class TestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setLegacyLocale(@NonNull Configuration config, @NonNull Locale locale) {
|
||||
public static void setLegacyLocale(Configuration config, Locale locale) {
|
||||
try {
|
||||
Field field = config.getClass().getField("locale");
|
||||
field.setAccessible(true);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.flutter.embedding.android;
|
||||
|
||||
import android.content.Intent;
|
||||
import androidx.annotation.NonNull;
|
||||
import org.robolectric.Robolectric;
|
||||
import org.robolectric.android.controller.ActivityController;
|
||||
|
||||
@@ -15,8 +14,7 @@ public class RobolectricFlutterActivity {
|
||||
* Creates a {@code FlutterActivity} that is controlled by Robolectric, which otherwise can not be
|
||||
* done in a test outside of the io.flutter.embedding.android package.
|
||||
*/
|
||||
@NonNull
|
||||
public static FlutterActivity createFlutterActivity(@NonNull Intent intent) {
|
||||
public static FlutterActivity createFlutterActivity(Intent intent) {
|
||||
ActivityController<FlutterActivity> activityController =
|
||||
Robolectric.buildActivity(FlutterActivity.class, intent);
|
||||
FlutterActivity flutterActivity = activityController.get();
|
||||
@@ -28,9 +26,8 @@ public class RobolectricFlutterActivity {
|
||||
* Returns a given {@code FlutterActivity}'s {@code BackgroundMode} for use by tests that do not
|
||||
* sit in the {@code io.flutter.embedding.android} package.
|
||||
*/
|
||||
@NonNull
|
||||
public static FlutterActivityLaunchConfigs.BackgroundMode getBackgroundMode(
|
||||
@NonNull FlutterActivity activity) {
|
||||
FlutterActivity activity) {
|
||||
return activity.getBackgroundMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import androidx.annotation.NonNull;
|
||||
import org.robolectric.annotation.Implements;
|
||||
import org.robolectric.annotation.RealObject;
|
||||
import org.robolectric.shadow.api.Shadow;
|
||||
@@ -17,8 +16,7 @@ public class SplashShadowResources {
|
||||
public static final int THEMED_SPLASH_DRAWABLE_ID = 212121;
|
||||
|
||||
// All other getDrawable() calls, call this method internally.
|
||||
@NonNull
|
||||
public Drawable getDrawableForDensity(int id, int density, @NonNull Resources.Theme theme)
|
||||
public Drawable getDrawableForDensity(int id, int density, Resources.Theme theme)
|
||||
throws Exception {
|
||||
if (id == SPLASH_DRAWABLE_ID) {
|
||||
return new ColorDrawable(Color.BLUE);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package io.flutter.plugins;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import io.flutter.embedding.engine.FlutterEngine;
|
||||
import java.util.ArrayList;
|
||||
@@ -15,7 +13,7 @@ import java.util.List;
|
||||
@VisibleForTesting
|
||||
public class GeneratedPluginRegistrant {
|
||||
private static final List<FlutterEngine> registeredEngines = new ArrayList<>();
|
||||
public static @Nullable RuntimeException pluginRegistrationException;
|
||||
public static RuntimeException pluginRegistrationException;
|
||||
|
||||
/**
|
||||
* The one and only method currently generated by the tool.
|
||||
@@ -23,7 +21,7 @@ public class GeneratedPluginRegistrant {
|
||||
* <p>Normally it registers all plugins in an app with the given {@code engine}. This fake tracks
|
||||
* all registered engines instead.
|
||||
*/
|
||||
public static void registerWith(@NonNull FlutterEngine engine) {
|
||||
public static void registerWith(FlutterEngine engine) {
|
||||
if (pluginRegistrationException != null) {
|
||||
throw pluginRegistrationException;
|
||||
}
|
||||
@@ -48,7 +46,6 @@ public class GeneratedPluginRegistrant {
|
||||
* <p>CAUTION: This list is static and must be manually wiped in between test runs. See {@link
|
||||
* #clearRegisteredEngines()}.
|
||||
*/
|
||||
@NonNull
|
||||
public static List<FlutterEngine> getRegisteredEngines() {
|
||||
return new ArrayList<>(registeredEngines);
|
||||
}
|
||||
|
||||
@@ -80,9 +80,6 @@ Future<int> runLint(ArgParser argParser, ArgResults argResults) async {
|
||||
if (!entity.path.endsWith('.java')) {
|
||||
continue;
|
||||
}
|
||||
if (entity.path.endsWith('Test.java')) {
|
||||
continue;
|
||||
}
|
||||
projectXml.writeln(' <src file="${entity.path}" />');
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,60 @@
|
||||
<module name="FlutterEngine" android="true" library="true" compile-sdk-version="android-S">
|
||||
<manifest file="../../../flutter/shell/platform/android/AndroidManifest.xml" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/TestUtils.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/SmokeTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/util/PathUtilsTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/util/ViewUtilsTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/util/PreconditionsTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/util/FakeKeyEvent.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/FlutterTestSuite.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/KeyChannelResponderTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterTextureViewTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterViewTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/SplashShadowResources.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/RobolectricFlutterActivity.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/KeyboardManagerTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterFragmentActivityTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterFragmentTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterEngineTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/renderer/FlutterRendererTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorViewTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterJNITest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterEngineConnectionRegistryTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/RenderingComponentTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistryTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartExecutorTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartMessengerTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterEngineCacheTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/loader/FlutterLoaderTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/loader/ApplicationInfoLoaderTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterEngineGroupComponentTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/systemchannels/TextInputChannelTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/systemchannels/DeferredComponentChannelTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/systemchannels/PlatformChannelTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/systemchannels/KeyEventChannelTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/systemchannels/RestorationChannelTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/FlutterShellArgsTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManagerTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/mouse/MouseCursorPluginTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/common/StandardMessageCodecTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/common/BinaryCodecTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/common/StandardMethodCodecTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/editing/ListenableEditingStateTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/editing/TextEditingDeltaTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/plugin/localization/LocalizationPluginTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/view/VsyncWaiterTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/FlutterInjectorTest.java" />
|
||||
<src file="../../../flutter/shell/platform/android/test/io/flutter/external/FlutterLaunchTests.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/app/FlutterPlayStoreSplitApplication.java" />
|
||||
@@ -129,8 +178,8 @@
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/common/MethodCall.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/common/EventChannel.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/common/MethodChannel.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/TextEditingDelta.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/ListenableEditingState.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java" />
|
||||
<src file="../../../flutter/shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java" />
|
||||
|
||||
Reference in New Issue
Block a user