Commit 8092f6a2 authored by Jason Simmons's avatar Jason Simmons Committed by Flutter GitHub Bot

Reland: Migrate some more integration tests to Android embedding v2 (#48840)

parent 493c99de
...@@ -28,5 +28,10 @@ found in the LICENSE file. --> ...@@ -28,5 +28,10 @@ found in the LICENSE file. -->
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </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> </application>
</manifest> </manifest>
...@@ -4,15 +4,14 @@ ...@@ -4,15 +4,14 @@
package com.yourcompany.platforminteraction; package com.yourcompany.platforminteraction;
import android.os.Bundle; import androidx.annotation.NonNull;
import io.flutter.app.FlutterActivity; import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.view.FlutterView;
public class MainActivity extends FlutterActivity { public class MainActivity extends FlutterActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(flutterEngine);
GeneratedPluginRegistrant.registerWith(this);
} }
} }
...@@ -33,5 +33,10 @@ found in the LICENSE file. --> ...@@ -33,5 +33,10 @@ found in the LICENSE file. -->
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </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> </application>
</manifest> </manifest>
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
package com.example.release_smoke_test; package com.example.release_smoke_test;
import android.os.Bundle; import androidx.annotation.NonNull;
import io.flutter.app.FlutterActivity; import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity { public class MainActivity extends FlutterActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(flutterEngine);
GeneratedPluginRegistrant.registerWith(this);
} }
} }
...@@ -28,5 +28,10 @@ found in the LICENSE file. --> ...@@ -28,5 +28,10 @@ found in the LICENSE file. -->
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </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> </application>
</manifest> </manifest>
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
package com.yourcompany.integration_ui; package com.yourcompany.integration_ui;
import android.os.Bundle; import androidx.annotation.NonNull;
import io.flutter.app.FlutterActivity; import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity { public class MainActivity extends FlutterActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(flutterEngine);
GeneratedPluginRegistrant.registerWith(this);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment