Update engine (#3214)
Also, update hello_android to use the new Java class names.
This commit is contained in:
parent
c00d61f6ec
commit
e456d86327
2
AUTHORS
2
AUTHORS
@ -1,5 +1,5 @@
|
||||
# Below is a list of people and organizations that have contributed
|
||||
# to the Sky project. Names should be added to the list like so:
|
||||
# to the Flutter project. Names should be added to the list like so:
|
||||
#
|
||||
# Name/Organization <email address>
|
||||
|
||||
|
2
bin/cache/engine.version
vendored
2
bin/cache/engine.version
vendored
@ -1 +1 @@
|
||||
94a4b96b40d1e85a4245cf8aafc385fe364c7347
|
||||
a299d69f6ca70f325d583eb678b91db24a155743
|
||||
|
@ -18,8 +18,8 @@ import android.widget.TextView;
|
||||
|
||||
import org.chromium.base.PathUtils;
|
||||
import org.domokit.activity.ActivityImpl;
|
||||
import org.domokit.sky.shell.SkyMain;
|
||||
import org.domokit.sky.shell.PlatformViewAndroid;
|
||||
import io.flutter.view.FlutterMain;
|
||||
import io.flutter.view.FlutterView;
|
||||
|
||||
import java.io.File;
|
||||
import org.json.JSONException;
|
||||
@ -28,21 +28,21 @@ import org.json.JSONObject;
|
||||
public class ExampleActivity extends Activity {
|
||||
private static final String TAG = "ExampleActivity";
|
||||
|
||||
private PlatformViewAndroid flutterView;
|
||||
private FlutterView flutterView;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SkyMain.ensureInitialized(getApplicationContext(), null);
|
||||
FlutterMain.ensureInitializationComplete(getApplicationContext(), null);
|
||||
setContentView(R.layout.flutter_layout);
|
||||
|
||||
flutterView = (PlatformViewAndroid) findViewById(R.id.flutter_view);
|
||||
File appBundle = new File(PathUtils.getDataDirectory(this), SkyMain.APP_BUNDLE);
|
||||
flutterView = (FlutterView) findViewById(R.id.flutter_view);
|
||||
File appBundle = new File(PathUtils.getDataDirectory(this), FlutterMain.APP_BUNDLE);
|
||||
flutterView.runFromBundle(appBundle.getPath(), null);
|
||||
|
||||
flutterView.addOnMessageListener("getLocation",
|
||||
new PlatformViewAndroid.OnMessageListener() {
|
||||
new FlutterView.OnMessageListener() {
|
||||
@Override
|
||||
public String onMessage(String message) {
|
||||
return onGetLocation(message);
|
||||
@ -103,7 +103,7 @@ public class ExampleActivity extends Activity {
|
||||
}
|
||||
|
||||
flutterView.sendToFlutter("getRandom", message.toString(),
|
||||
new PlatformViewAndroid.MessageReplyCallback() {
|
||||
new FlutterView.MessageReplyCallback() {
|
||||
@Override
|
||||
public void onReply(String json) {
|
||||
onRandomReply(json);
|
||||
|
@ -30,7 +30,7 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<org.domokit.sky.shell.PlatformViewAndroid
|
||||
<io.flutter.view.FlutterView
|
||||
android:id="@+id/flutter_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
|
@ -570,7 +570,7 @@ class _AdbLogReader extends DeviceLogReader {
|
||||
if (lastTimestamp != null)
|
||||
args.addAll(<String>['-T', lastTimestamp]);
|
||||
args.addAll(<String>[
|
||||
'-s', 'flutter:V', 'SkyMain:V', 'AndroidRuntime:W', 'ActivityManager:W', 'System.err:W', '*:F'
|
||||
'-s', 'flutter:V', 'FlutterMain:V', 'FlutterView:V', 'AndroidRuntime:W', 'ActivityManager:W', 'System.err:W', '*:F'
|
||||
]);
|
||||
_process = await runCommand(device.adbCommandForDevice(args));
|
||||
_stdoutSubscription =
|
||||
|
Loading…
x
Reference in New Issue
Block a user