Commit e456d863 authored by Adam Barth's avatar Adam Barth

Update engine (#3214)

Also, update hello_android to use the new Java class names.
parent c00d61f6
# Below is a list of people and organizations that have contributed # 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> # Name/Organization <email address>
......
94a4b96b40d1e85a4245cf8aafc385fe364c7347 a299d69f6ca70f325d583eb678b91db24a155743
...@@ -18,8 +18,8 @@ import android.widget.TextView; ...@@ -18,8 +18,8 @@ import android.widget.TextView;
import org.chromium.base.PathUtils; import org.chromium.base.PathUtils;
import org.domokit.activity.ActivityImpl; import org.domokit.activity.ActivityImpl;
import org.domokit.sky.shell.SkyMain; import io.flutter.view.FlutterMain;
import org.domokit.sky.shell.PlatformViewAndroid; import io.flutter.view.FlutterView;
import java.io.File; import java.io.File;
import org.json.JSONException; import org.json.JSONException;
...@@ -28,21 +28,21 @@ import org.json.JSONObject; ...@@ -28,21 +28,21 @@ import org.json.JSONObject;
public class ExampleActivity extends Activity { public class ExampleActivity extends Activity {
private static final String TAG = "ExampleActivity"; private static final String TAG = "ExampleActivity";
private PlatformViewAndroid flutterView; private FlutterView flutterView;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
SkyMain.ensureInitialized(getApplicationContext(), null); FlutterMain.ensureInitializationComplete(getApplicationContext(), null);
setContentView(R.layout.flutter_layout); setContentView(R.layout.flutter_layout);
flutterView = (PlatformViewAndroid) findViewById(R.id.flutter_view); flutterView = (FlutterView) findViewById(R.id.flutter_view);
File appBundle = new File(PathUtils.getDataDirectory(this), SkyMain.APP_BUNDLE); File appBundle = new File(PathUtils.getDataDirectory(this), FlutterMain.APP_BUNDLE);
flutterView.runFromBundle(appBundle.getPath(), null); flutterView.runFromBundle(appBundle.getPath(), null);
flutterView.addOnMessageListener("getLocation", flutterView.addOnMessageListener("getLocation",
new PlatformViewAndroid.OnMessageListener() { new FlutterView.OnMessageListener() {
@Override @Override
public String onMessage(String message) { public String onMessage(String message) {
return onGetLocation(message); return onGetLocation(message);
...@@ -103,7 +103,7 @@ public class ExampleActivity extends Activity { ...@@ -103,7 +103,7 @@ public class ExampleActivity extends Activity {
} }
flutterView.sendToFlutter("getRandom", message.toString(), flutterView.sendToFlutter("getRandom", message.toString(),
new PlatformViewAndroid.MessageReplyCallback() { new FlutterView.MessageReplyCallback() {
@Override @Override
public void onReply(String json) { public void onReply(String json) {
onRandomReply(json); onRandomReply(json);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/> />
</LinearLayout> </LinearLayout>
<org.domokit.sky.shell.PlatformViewAndroid <io.flutter.view.FlutterView
android:id="@+id/flutter_view" android:id="@+id/flutter_view"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
......
...@@ -570,7 +570,7 @@ class _AdbLogReader extends DeviceLogReader { ...@@ -570,7 +570,7 @@ class _AdbLogReader extends DeviceLogReader {
if (lastTimestamp != null) if (lastTimestamp != null)
args.addAll(<String>['-T', lastTimestamp]); args.addAll(<String>['-T', lastTimestamp]);
args.addAll(<String>[ 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)); _process = await runCommand(device.adbCommandForDevice(args));
_stdoutSubscription = _stdoutSubscription =
......
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