Migrate animations and palette_generator fully to v2 Android embedding (#512)

diff --git a/packages/animations/example/android/app/src/main/AndroidManifest.xml b/packages/animations/example/android/app/src/main/AndroidManifest.xml
index 1fc0ab4..8fd2d32 100644
--- a/packages/animations/example/android/app/src/main/AndroidManifest.xml
+++ b/packages/animations/example/android/app/src/main/AndroidManifest.xml
@@ -1,12 +1,6 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="dev.flutter.packages.animations.example">
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
-         calls FlutterMain.startInitialization(this); in its onCreate method.
-         In most cases you can leave this as-is, but you if you want to provide
-         additional functionality it is fine to subclass or reimplement
-         FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
         android:label="example"
         android:icon="@mipmap/ic_launcher">
         <activity
diff --git a/packages/animations/example/android/app/src/main/kotlin/dev/flutter/packages/animations/example/MainActivity.kt b/packages/animations/example/android/app/src/main/kotlin/dev/flutter/packages/animations/example/MainActivity.kt
index cde3a3b..643179c 100644
--- a/packages/animations/example/android/app/src/main/kotlin/dev/flutter/packages/animations/example/MainActivity.kt
+++ b/packages/animations/example/android/app/src/main/kotlin/dev/flutter/packages/animations/example/MainActivity.kt
@@ -1,12 +1,7 @@
 package dev.flutter.packages.animations.example
 
-import androidx.annotation.NonNull;
 import io.flutter.embedding.android.FlutterActivity
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.plugins.GeneratedPluginRegistrant
 
 class MainActivity: FlutterActivity() {
-    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
-        GeneratedPluginRegistrant.registerWith(flutterEngine);
-    }
+
 }
diff --git a/packages/imitation_game/imitation_tests/smiley/flutter/smiley/android/app/src/main/AndroidManifest.xml b/packages/imitation_game/imitation_tests/smiley/flutter/smiley/android/app/src/main/AndroidManifest.xml
index d377ac5..166ad7f 100644
--- a/packages/imitation_game/imitation_tests/smiley/flutter/smiley/android/app/src/main/AndroidManifest.xml
+++ b/packages/imitation_game/imitation_tests/smiley/flutter/smiley/android/app/src/main/AndroidManifest.xml
@@ -1,12 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.example.smiley">
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
-         calls FlutterMain.startInitialization(this); in its onCreate method.
-         In most cases you can leave this as-is, but you if you want to provide
-         additional functionality it is fine to subclass or reimplement
-         FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
+        android:name="${applicationName}"
         android:label="smiley"
         android:icon="@mipmap/ic_launcher">
         <activity
diff --git a/packages/palette_generator/example/android/app/src/main/AndroidManifest.xml b/packages/palette_generator/example/android/app/src/main/AndroidManifest.xml
index a3cd38c..d55ab0a 100644
--- a/packages/palette_generator/example/android/app/src/main/AndroidManifest.xml
+++ b/packages/palette_generator/example/android/app/src/main/AndroidManifest.xml
@@ -7,13 +7,7 @@
     -->
     <uses-permission android:name="android.permission.INTERNET"/>
 
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
-         calls FlutterMain.startInitialization(this); in its onCreate method.
-         In most cases you can leave this as-is, but you if you want to provide
-         additional functionality it is fine to subclass or reimplement
-         FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
         android:label="image_colors"
         android:icon="@mipmap/ic_launcher">
         <activity
@@ -35,5 +29,10 @@
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
     </application>
 </manifest>
diff --git a/packages/palette_generator/example/android/app/src/main/java/io/flutter/packages/palettegenerator/imagecolors/MainActivity.java b/packages/palette_generator/example/android/app/src/main/java/io/flutter/packages/palettegenerator/imagecolors/MainActivity.java
index 4935975..b931804 100644
--- a/packages/palette_generator/example/android/app/src/main/java/io/flutter/packages/palettegenerator/imagecolors/MainActivity.java
+++ b/packages/palette_generator/example/android/app/src/main/java/io/flutter/packages/palettegenerator/imagecolors/MainActivity.java
@@ -4,14 +4,6 @@
 
 package io.flutter.packages.palettegenerator.imagecolors;
 
-import android.os.Bundle;
-import io.flutter.app.FlutterActivity;
-import io.flutter.plugins.GeneratedPluginRegistrant;
+import io.flutter.embedding.android.FlutterActivity;
 
-public class MainActivity extends FlutterActivity {
-  @Override
-  protected void onCreate(Bundle savedInstanceState) {
-    super.onCreate(savedInstanceState);
-    GeneratedPluginRegistrant.registerWith(this);
-  }
-}
+public class MainActivity extends FlutterActivity {}
diff --git a/packages/palette_generator/example/android/app/src/main/kotlin/io/flutter/packages/palettegenerator/example/MainActivity.kt b/packages/palette_generator/example/android/app/src/main/kotlin/io/flutter/packages/palettegenerator/example/MainActivity.kt
index e121e6c..af4031a 100644
--- a/packages/palette_generator/example/android/app/src/main/kotlin/io/flutter/packages/palettegenerator/example/MainActivity.kt
+++ b/packages/palette_generator/example/android/app/src/main/kotlin/io/flutter/packages/palettegenerator/example/MainActivity.kt
@@ -1,12 +1,7 @@
 package io.flutter.packages.palettegenerator.imagecolors
 
-import androidx.annotation.NonNull;
 import io.flutter.embedding.android.FlutterActivity
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.plugins.GeneratedPluginRegistrant
 
 class MainActivity: FlutterActivity() {
-    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
-        GeneratedPluginRegistrant.registerWith(flutterEngine);
-    }
+
 }
diff --git a/packages/pigeon/e2e_tests/test_objc/android/app/src/main/AndroidManifest.xml b/packages/pigeon/e2e_tests/test_objc/android/app/src/main/AndroidManifest.xml
index b62dd45..e692be3 100644
--- a/packages/pigeon/e2e_tests/test_objc/android/app/src/main/AndroidManifest.xml
+++ b/packages/pigeon/e2e_tests/test_objc/android/app/src/main/AndroidManifest.xml
@@ -1,12 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.example.test_objc">
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
-         calls FlutterMain.startInitialization(this); in its onCreate method.
-         In most cases you can leave this as-is, but you if you want to provide
-         additional functionality it is fine to subclass or reimplement
-         FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
+        android:name="${applicationName}"
         android:label="test_objc"
         android:icon="@mipmap/ic_launcher">
         <activity