Skip to content

Commit

Permalink
Deprecate Android v1 embedding classes (flutter#20868)
Browse files Browse the repository at this point in the history
  • Loading branch information
xster authored Sep 21, 2020
1 parent 87eff25 commit 3011b14
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions shell/platform/android/io/flutter/app/FlutterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
/**
* Deprecated base class for activities that use Flutter.
*
* <p>Deprecation: {@link io.flutter.embedding.android.FlutterActivity} is the new API that now
* replaces this class. See https://flutter.dev/go/android-project-migration for more migration
* details.
* @deprecated {@link io.flutter.embedding.android.FlutterActivity} is the new API that now replaces
* this class. See https://flutter.dev/go/android-project-migration for more migration details.
*/
@Deprecated
public class FlutterActivity extends Activity
implements FlutterView.Provider, PluginRegistry, ViewFactory {
private static final String TAG = "FlutterActivity";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
* your activity implement {@link PluginRegistry} and/or {@link
* io.flutter.view.FlutterView.Provider} and forward those methods to this class as well.
*
* <p>Deprecation: {@link io.flutter.embedding.android.FlutterActivity} is the new API that now
* replaces this class and {@link io.flutter.app.FlutterActivity}. See
* https://flutter.dev/go/android-project-migration for more migration details.
* @deprecated {@link io.flutter.embedding.android.FlutterActivity} is the new API that now replaces
* this class and {@link io.flutter.app.FlutterActivity}. See
* https://flutter.dev/go/android-project-migration for more migration details.
*/
@Deprecated
public final class FlutterActivityDelegate
implements FlutterActivityEvents, FlutterView.Provider, PluginRegistry {
private static final String SPLASH_SCREEN_META_DATA_KEY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
* Deprecated class for activities that use Flutter who also require the use of the Android v4
* Support library's {@link FragmentActivity}.
*
* <p>Deprecation: this class is replaced by {@link
* io.flutter.embedding.android.FlutterFragmentActivity}.
*
* <p>Applications that don't have this need will likely want to use {@link FlutterActivity}
* instead.
*
Expand All @@ -31,7 +28,10 @@
*
* @see <a target="_new"
* href="https://developer.android.com/training/testing/set-up-project">https://developer.android.com/training/testing/set-up-project</a>
* @deprecated this class is replaced by {@link
* io.flutter.embedding.android.FlutterFragmentActivity}.
*/
@Deprecated
public class FlutterFragmentActivity extends FragmentActivity
implements FlutterView.Provider, PluginRegistry, ViewFactory {
private final FlutterActivityDelegate delegate = new FlutterActivityDelegate(this, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import java.util.List;
import java.util.Map;

/// This class is now deprecated. See https://flutter.dev/go/android-project-migration for
/// migration instructions.
/** @deprecated See https://flutter.dev/go/android-project-migration for migration instructions. */
@Deprecated
public class FlutterPluginRegistry
implements PluginRegistry,
PluginRegistry.RequestPermissionsResultListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
* defaults to an instance of {@link io.flutter.app.FlutterActivity}, itself a {@link
* PluginRegistry}.
*
* <p>This class is now deprecated. See https://flutter.dev/go/android-project-migration for
* migration details.
* @deprecated See https://flutter.dev/go/android-project-migration for migration details.
*/
@Deprecated
public interface PluginRegistry {
/**
* Returns a {@link Registrar} for receiving the registrations pertaining to the specified plugin.
Expand Down
3 changes: 2 additions & 1 deletion shell/platform/android/io/flutter/view/FlutterMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
/**
* A legacy class to initialize the Flutter engine.
*
* <p>Replaced by {@link io.flutter.embedding.engine.loader.FlutterLoader}.
* @deprecated Replaced by {@link io.flutter.embedding.engine.loader.FlutterLoader}.
*/
@Deprecated
public class FlutterMain {

public static class Settings {
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/android/io/flutter/view/FlutterNativeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
import io.flutter.plugin.common.*;
import java.nio.ByteBuffer;

/**
* @deprecated {@link io.flutter.embedding.android.FlutterView} is the new API that now replaces
* this class. See https://flutter.dev/go/android-project-migration for more migration details.
*/
@Deprecated
public class FlutterNativeView implements BinaryMessenger {
private static final String TAG = "FlutterNativeView";

Expand Down
5 changes: 3 additions & 2 deletions shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@
/**
* Deprecated Android view containing a Flutter app.
*
* <p>Deprecation: {@link io.flutter.embedding.android.FlutterView} is the new API that now replaces
* this class. See https://flutter.dev/go/android-project-migration for more migration details.
* @deprecated {@link io.flutter.embedding.android.FlutterView} is the new API that now replaces
* this class. See https://flutter.dev/go/android-project-migration for more migration details.
*/
@Deprecated
public class FlutterView extends SurfaceView
implements BinaryMessenger, TextureRegistry, MouseCursorPlugin.MouseCursorViewDelegate {
/**
Expand Down

0 comments on commit 3011b14

Please sign in to comment.