62 Commits

Author SHA1 Message Date
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
Adam Barth
9e1e1fba54 Fix Android build 2016-02-13 00:09:32 -08:00
Adam Barth
b09cd543bd Add an off-by-default flag for background compilation 2016-02-12 16:01:18 -08:00
Jason Simmons
ae517c2fee Add a way to override the snapshot when running an FLX bundle 2016-02-09 10:08:26 -08:00
Hixie
920e411493 Accessibility fixes
- Correctly enable accessibility on startup if it's already enabled.
- Avoid using deprecated APIs.
- Map FORWARD/BACKWARD scrolling actions to up/down even when left/right
  is also possible.
- Clear the accessibility focus when removing a focused semantics node.
- Unregister listeners when view goes away.
- Call setWillNotDraw(false) if accessibility is enabled.
- Clean the handling of hover events.
- Work around an Android bug where the system focus rect isn't drawn
  the first time.
2016-02-08 10:35:40 -08:00
Hixie
d0e17e679a Track whether accessibility is enabled.
If we send accessibility events when accessibility is disabled, we crash.
2016-02-05 10:05:57 -08:00
Hixie
707ff9b4e2 Implement hover touch exploration mode on Android. 2016-02-04 16:56:07 -08:00
Hixie
0fa8524288 Android accessibility focus support
This lets you focus and unfocus a node.

Still doesn't seem to be enough to actually have the node exposed in
TalkBack. We probably need hover for that (that's next).

(Also fixes a leak for when a subtree has been disconnected; previously
we were only forgetting the top node of the subtree, not the
descendants. Thanks @krisgiesing for catching that.)
2016-02-04 15:53:17 -08:00
Hixie
17806fdb76 Tell Android when the accessibility tree changes
Hard to say if this actually works. We'll find out once we've filled
this out enough that you can walk the tree in Android's Talkback UI.
2016-02-04 14:53:22 -08:00
Hixie
cb789edc94 Make AccessibilityNodeInfos interactive.
This exposes the actions on AccessibilityNodeInfo nodes.
It also tries to make the code that handles reloads more correct.
2016-02-04 14:53:22 -08:00
Hixie
adbb587ab1 Flutter<->Android accessibility bridge
This is another step towards enabling accessibility for Flutter on
Android. It exposes the semantics tree to Android's accessibility API
when accessibility is enabled.

It does not yet:
 - allow one to actually interact with the application via the
   accessibility API
 - expose the accessibility tree to touch exploration
 - implement the accessibility focus API

However, you can see the tree if you run uiautomatorviewer. It is there,
and it matches the UI. At least in Stocks. I didn't test anything else.
2016-02-04 09:15:07 -08:00
Jason Simmons
1782b8f280 Change services to create temporary files that will be deleted by the ResourceCleaner
If the Sky shell process does not have an orderly shutdown, then temporary
files created by services may never be cleaned up.

The ResourceCleaner task will run at the next startup and clean up any files
that match the prefix used by Chromium's temporary file API.  Services will
now use the same prefix for their files.
2016-02-03 11:50:09 -08:00
Jason Simmons
7730a0c123 Implementation of platform services for Android 2016-02-02 16:10:22 -08:00
Devon Carew
7204fc0663 Merge pull request #2335 from devoncarew/start_paused
some work towards a --start-paused flag
2016-02-02 12:20:43 -08:00
Devon Carew
3c83f895ed some work towards a --start-paused flag 2016-02-02 11:44:01 -08:00
Adam Barth
bdacb56cdd Improve IME interface
Instead of providing a stream of mutations, we now provide a the client with
the complete state of the editing control to prevent the two from getting out
of sync.

As a side-effect, we can now move the cursor around when editing a text field.
2016-02-01 20:41:48 -08:00
Jason Simmons
35e3e94e25 Create a new pipe to the ServiceProvider when PlatformViewAndroid starts a Dart isolate
Previously PlatformViewAndroid would create a pipe and hand it off to the
SkyEngine, which would give it to the isolate's DartState.  If a second
isolate is created, the SkyEngine would no longer hold a valid proxy to a
ServicesProvider, and the new isolate's Dart code can not obtain the
servicesProvidedByEmbedder.
2016-01-28 11:13:46 -08:00
Adam Barth
142c5dc5ec Remove almost all uses of base::scoped_ptr
We now use std::unique_ptr more consistently.
2016-01-27 01:05:47 -08:00
Collin Jackson
8d056e02a6 Use the same registration process as GCM for Firebase 2016-01-22 18:23:22 -08:00
Matt Perry
0ee5a29163 Support dynamic registration of mojo services on Android
SkyApplication now reads service info from a services.json file bundled
with the apk. For each service, it registers a method that invokes
connectToService on a named class. This way, third party services can
register themselves.

There's a corresponding change to flutter_tools to generate this
services.json when building an apk that depends on services.
2016-01-21 16:55:51 -05:00
Adam Barth
33d7553e39 Improve handling of window insets on Android
Now that we understand window insets, we don't need to hard-code the size of
the status bar. Also, convert the viewport metrics to be consistently in
physical pixels.
2016-01-21 11:24:17 -08:00
Collin Jackson
9d715b340a Initial Firebase Flutter service implementation 2016-01-08 15:28:07 -08:00
Jason Simmons
a9c22e9d8c Initial work toward exposing the Java native interface APIs in Dart 2016-01-07 15:06:35 -08:00
Adam Barth
241fc21055 Don't destory the engine when detaching from the window
Reading the Android docs, it sounds like an android.view.View can re-attach to
the window after detaching. Previously, we destroyed the engine when we
detached from the window. Now we wait for the activity to be destroyed.

Hopefully fixes #997
2016-01-04 10:39:09 -08:00
Jason Simmons
e55cf62694 Provide callbacks for activity pause and resume events 2015-12-15 18:01:36 -08:00
Matt Perry
6a2f58091f Turn on FLX updater. 2015-12-08 14:41:32 -05:00
Jason Simmons
98427a2763 Tell Flutter about the host platform's locale 2015-12-07 14:27:22 -08:00
Eric Seidel
231ee08fd7 Add support on Android for --trace-startup
Now 'flutter start --trace-startup' can trigger this tracing
on Android

@chinmaygarde
2015-12-03 12:25:26 -08:00
Eric Seidel
d91d60d449 Give the java ui thread a name in trace files
@abarth
2015-12-03 11:25:04 -08:00
Eric Seidel
a92597ee07 Add various trace events for tracing startup
@abarth
2015-12-02 12:18:20 -08:00
Chinmay Garde
34696334a4 Allow capturing unified (Dart and base) traces from observatory
* Start capturing via <obs_host>:<obs_port>/flutter_startTracing
* Stop capturing via <obs_host>:<obs_port>/flutter_stopTracing
2015-12-01 13:26:53 -08:00
Adam Barth
68dfad8e92 Add --flx flag to load FLX files
Also, remove the --snapshot flag because using FLX files is the path we're
paving.
2015-11-27 23:14:07 -08:00