93 Commits

Author SHA1 Message Date
Todd Volkert
2cf8b14487 Add config properties to specify snapshot blob file names. (#2943)
* Add config properties to specify snapshot blob file names.

This adds the ability of the shell to override the default
dart aot snapshot blob file names, and it wires up Android's
FlutterMain to recognize the properties in the app's manifest.

This will be used for flutter applications that build their
binary snapshots into files other than the default ones
that the engine uses.
2016-08-18 16:27:16 -07:00
John McCutchan
b8c1fe7e46 Fix Android keyboard in hot mode (#2944) 2016-08-18 14:00:25 -07:00
Adam Barth
4cab94e949 Invert the relationship between lib/ui and sky/engine (#2920)
Now lib/ui depends on sky/engine rather than the reverse.
2016-08-12 16:12:07 -07:00
Jason Simmons
d90657feb1 Do not delete the JNI local reference to the surface passed to SurfaceCreated (#2902) 2016-08-10 14:33:34 -07:00
Adam Barth
9c09565712 Update paths to account for buildroot 2016-08-09 13:52:15 -07:00
Adam Barth
5f75e0bf30 Remove more //base dependencies from //sky/shell (#2889)
This patch hides the base::SingleThreadedTaskRunner, which pulls a big
switchover to ftl::WeakPtr and std::function.
2016-08-08 20:00:37 -07:00
Adam Barth
4fa03ded48 Remove //base dependencies from //sky/shell (#2888) 2016-08-08 14:58:25 -07:00
Jason Simmons
6394e04973 On Android, create a global resource context that is shared with all PlatformViews (#2867)
Previously we had created a resource context for each PlatformView which would
be destroyed when the PlatformView lost its surface.

Fixes https://github.com/flutter/flutter/issues/5200
2016-08-04 19:48:27 -07:00
Chinmay Garde
ace8307aab Asynchronous texture upload. (#2837) 2016-08-01 16:05:45 -07:00
Adam Barth
11dd5cada9 Add trace events to swap buffers (#2823) 2016-07-26 12:16:32 -07:00
Jason Simmons
9546168c37 Recreate the EGL surface after a resize in order to correctly handle screen rotation on Android (#2813) 2016-07-21 15:13:26 -07:00
John McCutchan
855e23910a Add intent for running from a script file (#2807) 2016-07-20 10:35:45 -07:00
Jason Simmons
0df124f969 Add an alternate name for an FLX built in profile mode (#2806) 2016-07-19 15:13:08 -07:00
John McCutchan
0b1986a5c1 Fix DevFS on Android devices (#2801) 2016-07-18 12:16:57 -07:00
Chinmay Garde
fe69b034c0 Remove dependencies on ui, third_party/mesa and mojo/convertors. Provide simple alternatives. (#2783) 2016-07-12 14:47:44 -07:00
Jason Simmons
7040ec5855 Use immersive mode on Android when all system UI overlays have been disabled (#2791)
This requires adding a way for platform services (namely SystemChromeImpl) to
listen for activity lifecycle events

Fixes https://github.com/flutter/flutter/issues/4885
2016-07-12 10:12:32 -07:00
Jason Simmons
5ccb7f9abd Allow multiple Android resource names for the app bundle (#2790)
Also provide an API for obtaining the path where the app bundle was extracted
2016-07-11 13:44:42 -07:00
Adam Barth
71ce354a44 Harmonize Android and iOS accessibility bridges (#2777)
These classes now use the same terminology and work in the same way.
Also, change semantics.mojom to use an enumeration of actions instead of
having a separate method per action. This will hopefully scale better.
2016-06-30 16:49:04 -07:00
Adam Barth
93753789bb Add isAdjustable to SemanticFlags (#2776) 2016-06-28 15:07:55 -07:00
Chinmay Garde
bb9865538b Rename uri_launcher.mojom to url_launcher.mojom. (#2773) 2016-06-22 17:15:51 -07:00
Jason Simmons
f59f7dadbd Remove FlutterView.onResume (#2768)
It's empty and is easily confused with onPostResume
2016-06-20 15:01:15 -07:00
Jason Simmons
471beb05aa Pass the FlutterView to app message listeners (#2767)
This will make it simpler to write listeners that can be reused in multiple
applications.
2016-06-20 13:29:46 -07:00
Chinmay Garde
02b7238cbb Android platform implementation of uri_launcher.mojom (#2760) 2016-06-15 12:35:06 -07:00
Adam Barth
12fab2f28a Move dart:jni to //flutter/lib/jni (#2744)
This patch disentangles dart:jni from //sky/engine and moves it into
//flutter/lib/jni. Eventually dart:ui will move into a peer directory.
2016-06-11 09:15:39 -07:00
Adam Barth
81ae27ab61 Remove startup flicker on Android (#2733)
According to hackbod on Stack Overflow, we're supposed to block in the
surfaceCreated callback until we've actually drawn into the surface:

http://stackoverflow.com/questions/8772862/surfaceview-flashes-black-on-load/8888108#8888108
2016-06-02 21:01:02 -07:00
Jason Simmons
7a49b37a74 Implement a protocol for discovering active Flutter instances on Android (#2720)
Tools can send a broadcast intent that will cause Flutter processes to
write their names and observatory ports to the log in JSON format.
2016-05-27 17:11:34 -07:00
Adam Barth
1035e5e60b Roll Mojo to 9a791294e429f9f2ca4f427796a284edb6f6768e (#2663)
* Update to mojo 9a791294e429f9f2ca4f427796a284edb6f6768e

* Update to account for Mojo API changes
2016-05-09 10:56:47 -07:00
Matt Perry
f608c94934 Add mojo service for accessing the system clipboard. (#2659)
* Add mojo service for accessing the system clipboard.

Hooked up for iOS and Android.

BUG=https://github.com/flutter/flutter/issues/1567
2016-05-09 13:26:19 -04:00
Jason Simmons
c74c0bfb09 Explicitly close Mojo proxies during destruction of a FlutterView (#2646)
Partial fix for https://github.com/flutter/flutter/issues/2950
2016-05-04 14:35:35 -07:00
Jason Simmons
db5d105e1d Improve cleanup of the FlutterView's Mojo service providers (#2644) 2016-05-04 10:02:30 -07:00
Adam Barth
0e991c74b2 Remove dependency from //sky/services/platform to //sky/services/activity (#2643)
Instead of using a static Activity, we can use the one we get when we construct
the service.
2016-05-03 15:02:36 -07:00
Jason Simmons
a0fd858c22 Remove the intents for controlling tracing on Android (#2639)
The flutter tool is now using the observatory's HTTP-based interface
2016-05-02 16:00:59 -07:00
Adam Barth
6740388a4a Remove legacy interfaces from activity.mojom (#2638)
These are now offerred by the Flutter platform services (e.g., SystemChrome,
SystemSound, HapticFeedback).
2016-05-02 14:24:40 -07:00
Jason Simmons
f1a8c5468d Load the precompiled snapshot from a group of asset files on Android (#2621)
Previously the AOT snapshot was packaged as a dynamic library (similar to the
scheme used on iOS).  This change eliminates the need for a native code
toolchain when building for AOT.
2016-04-27 15:35:25 -07:00
Jason Simmons
b478563ea6 Support ahead-of-time compilation on Android in the engine (#2614)
This include build system changes for selecting Dart's precompiler mode
plus a way to locate and load the precompiled snapshot library from an
Android application
2016-04-25 10:45:23 -07:00
Yegor
7a919c0f58 record startup timestamp in Android; pass it to Dart timeline (#2612) 2016-04-22 13:41:38 -07:00
Ian Hickson
68cc67f2ec Merge pull request #2597 from Hixie/3177
Fix crashes with LastPass, Now-on-Tap, DashLane
2016-04-14 18:08:05 -07:00
Jason Simmons
c53ddc5c5f Allow detach of an Android PlatformView that still holds a window (#2591)
The PlatformView may not receive the surfaceDestroy notification before its
activity is destroyed (this was happening on the Android emulator).

If this happens, allow the PlatformView to be detached and have it release
its window during destruction.
2016-04-11 11:08:14 -07:00
Adam Barth
a299d69f6c Rename PlatformViewAndroid to io.flutter.view.FlutterView (#2586)
This patch cleans up the public Java interface to the Flutter engine. The code
that we intend to be re-usable is now in the io.flutter.view package. The two
public classes are:

 * FlutterMain, which controls initialization of the system, and
 * FlutterView, which is an Android view that hosts a Flutter app.

We'll need to interate on these interface over time, but at least these names
are more reasonable.
2016-04-08 09:39:14 -07:00
Jason Simmons
370db6cda3 Provide Mojo services for passing application-specific messages between the host and Flutter 2016-03-21 11:25:00 -07:00
Adam Barth
944b2eeca9 Move Keyboard and RawKeyboard to view services
These services are relative to the current view, which means they should come
in through the view services.
2016-03-18 12:37:30 -07:00
Adam Barth
678d5f9bac Cleanup MojoServices in dart:ui
This patch cleans up the way we expose Mojo services into Dart. It also adds a
service provider for "view services," which will evetually contain the raw
keyboard service.
2016-03-18 10:52:13 -07:00
Adam Barth
410aac589b Flutter apps in Mozart should have reasonable Uri.base
Previously this value was the temp directory that we used to store the FLX
bundle. Now it's the URL given to us by MojoShell.
2016-03-18 09:53:44 -07:00
Chinmay Garde
e09819e544 Fix Android builds. Accessing traces is now possible from observatory. 2016-03-17 11:24:52 -07:00
Jason Simmons
a3201f2023 Move SkyApplication initialization into SkyMain
This allows Flutter embedders to set up Flutter from their own application
class instead of using or subclassing SkyApplication
2016-03-16 10:28:40 -07:00
Jason Simmons
e2e7e4c79a Make the engine private to the Sky package and expose the relevant public methods on PlatformViewAndroid 2016-03-14 16:37:58 -07:00
Jason Simmons
722d712b7e Expose some public APIs for use by Flutter embedders outside the sky shell package
Also add a PlatformViewAndroid constructor required to support inflating
a Flutter view from an XML layout
2016-03-11 14:43:35 -08:00
Adam Barth
95b5d5dfa8 Update uses of Mojo to new interfaces 2016-03-02 14:14:55 -08:00
Matt Perry
34fb968705 Remove unused UpdateService. 2016-02-29 15:11:33 -05:00
Adam Barth
09e87f5865 Enable background compilation by default
We've been enabling it in the flutter tool for a while. This patch enables by
default in general.
2016-02-24 14:55:58 -08:00