48 Commits

Author SHA1 Message Date
Jason Simmons
232f4636e5 Do not send messages if the platform view has been detached (#3927) 2017-07-26 20:04:31 -07:00
Jason Simmons
538e103b2c Catch exceptions during invocations of updateSemantics from native code (#3813) 2017-06-22 11:19:32 -07:00
Jason Simmons
834fb9638e Simplify state management in the Android text editing plugin (#3769)
In particular, this avoids some unnecessary calls to InputMethodManager.restartInput
that caused noticeable lag when moving the cursor.

Fixes https://github.com/flutter/flutter/issues/9928
2017-06-14 10:24:41 -07:00
Todd Volkert
b91d2f1bb4 Fix some minor issues with Javadocs (#3761) 2017-06-09 07:35:50 -07:00
Todd Volkert
ec8cbe0fb6 Refactor FlutterActivity to be more composable (#3748)
This factors the functionality that was in `FlutterActivity`
to live in `FlutterActivityDelegate`. This will allow the creation of a
`FlutterFragmentActivity` that has the same core functionality, which in
turn unlocks certain Android plugins that choose to require the v4
support library (like Google Sign-In).

https://github.com/flutter/flutter/issues/10072
2017-06-07 12:28:41 -07:00
Jason Simmons
c457ec6341 AndroidSurfaceSoftware renderer based on NDK native window APIs (#3745) 2017-06-06 16:58:43 -07:00
Sarah Zakarias
f37aafd456 Add setInitialRoute on FlutterView. (#3727) 2017-06-06 10:59:41 +02:00
Jason Simmons
16c411205f Render software rasterizer bitmaps through the SurfaceHolder (#3736) 2017-06-05 12:21:14 -07:00
Gary Qian
796259c089 Allow switching to the software rendering backend on Android. (#3719)
* Enable software rendering backend on android. Add "enable-software-rendering" flag.

* Fix variable naming and threading.
2017-05-31 17:27:47 -07:00
Chris Bracken
75c74dc463 Add inactive, suspending ApplicationLifecycleState values (#3713)
**This is a breaking change on iOS**

Previously, the `paused` state was entered when the application resigned
active status. `inactive` now maps to this status. `paused` now maps to
an app that has been backgrounded.

`inactive` is currently emitted on iOS only and corresponds to iOS's
foreground inactive state.

Current state transitions are:
`resumed` <--> `inactive` <--> `paused`

suspending is currently emitted on Android only and corresponds to the
transition to Android's stopped state.

Current state transitions are:
`resumed` <--> `paused` --> `suspending` --> `resumed`

These transitions may change in future.
2017-05-24 16:34:34 -07:00
Ian Hickson
0d94214df4 Fix a11y an Android (#3694)
The core problem was multiplying matrices the wrong way around.

While I was there I did some minor cleanup. I think that may have
fixed another bug relating to A11Y turning on or off improperly, but
since I never figured out the steps to reproduce, it's hard to tell.

Fixes https://github.com/flutter/flutter/issues/7205
Fixes https://github.com/flutter/flutter/issues/10059 (maybe)
2017-05-16 10:31:53 -07:00
Mikkel Nygaard Ravn
4eed7d2732 Clarify semantics of channel-related errors (#3607)
Mainly improvements to javadoc and error logging. A bit of refactoring.
2017-04-19 21:53:46 +02:00
Mikkel Nygaard Ravn
2a4434a058 Make naming consistent across channel APIs (#3574) 2017-04-18 14:30:31 +02:00
Mikkel Nygaard Ravn
68194b8df8 Distinguish between null platform message and one with zero-byte payload (#3577) 2017-04-09 00:07:28 +02:00
Jason Simmons
7356a50445 Copy platform message buffers into byte arrays passed via JNI (#3536)
The Java message object may be held by user-provided message handlers beyond
the lifetime of the raw blink::PlatformMessage and its data buffer
2017-03-28 17:15:01 -07:00
Chinmay Garde
1c07ea530f Remove uses of //base from all //flutter projects and replace them with //fml variants. (#3492) 2017-03-22 15:42:51 -07:00
Mikkel Nygaard Ravn
c4edec7417 Remove old flutter messaging API (#3482)
Breaking change: removed facilities for JSON and string messaging from FlutterView/FlutterViewController, leaving only binary messaging there. All other use of flutter communication now goes through FlutterMessageChannel and FlutterMethodChannels. Retained use of String and JSON codecs for now.

Companion flutter PR: flutter/flutter#8837
2017-03-17 09:04:59 +01:00
Jason Simmons
b1a163858d Send an event to signal memory pressure (#3475)
See https://github.com/flutter/flutter/issues/7561
2017-03-14 15:42:30 -07:00
Mikkel Nygaard Ravn
74de13c0bd FlutterXxxChannel concepts added to support Flutter/Android interop (#3446)
New concepts: FlutterMessageChannel (basic message send/receive superseding existing FlutterView methods), FlutterMethodChannel (method invocation and event streams), pluggable codecs for messages and method calls: unencoded binary, string, json, and 'standard' flutter binary encoding.
2017-03-01 13:54:32 +01:00
Jason Simmons
2466d31edf Fix some Javadoc warnings (#3391) 2017-02-03 16:25:25 -08:00
Jason Simmons
c01c8c4a39 Apply window insets using an older API on pre-Lollipop systems (#3340)
Fixes https://github.com/flutter/flutter/issues/6586
2017-01-17 15:36:47 -08:00
Jason Simmons
60681a233f Do not dispatch UI events if they arrive after the FlutterView has been destroyed (#3306)
Fixes https://github.com/flutter/flutter/issues/7234
2016-12-12 16:30:26 -08:00
Jason Simmons
2f32e8054d Catch and log exceptions thrown in message listeners provided by apps (#3297)
FlutterView's host message processing methods are invoked from native code,
and the JNI wrappers will abort the process if the Java side has an uncaught
exception.
2016-12-07 14:47:40 -08:00
Adam Barth
cea5ed2b9b Update pointer change constants in Java (#3231)
I updated the C++ and Dart sides but forgot to update the Java side.

Fixes https://github.com/flutter/flutter/issues/6891
2016-11-16 10:13:28 -08:00
Adam Barth
d1bc4c4850 Add support for hover pointer events (#3227)
These are implemented on macOS and Fuchsia.
2016-11-15 20:18:22 -08:00
Jason Simmons
e54b0e286b Roll Dart (#3194)
Update DartServiceIsolate/FlutterView because VMServiceIO_NotifyServerState
now provides a URI for the observatory
2016-11-01 17:11:56 -07:00
Adam Barth
4b8c9051e5 Remove last mojom interface (#3184)
We no longer use mojom to transport messages. We still use the Mojo EDK
to spin the event loop, however.
2016-10-28 11:46:57 -07:00
Adam Barth
9eaedb0677 Migrate ViewportMetrics away from Mojo (#3180)
Now we just pass the data directly.
2016-10-27 13:12:55 -07:00
Adam Barth
7e5d63513a Move lifecycle, navigation, and localization to platform messages (#3172)
Previously, these signals were sent over Mojo. Now we send them through
platform messages.
2016-10-25 15:51:27 -07:00
Adam Barth
d4f67e6b75 Migrate vsync away from Mojo services (#3169)
Instead, just use JNI and Objective-C directly.
2016-10-24 16:14:37 -07:00
Adam Barth
b1c0ea79ca Switch engine over to platform messages (#3153)
This patch removes the use of the host messages mojom and switch all
message routing over to platform messages.
2016-10-19 22:36:00 -07:00
Adam Barth
f1b740c8c2 Remove editing.mojom (#3152)
Clients have been migrated to the TextInputPlugin.
2016-10-19 22:12:19 -07:00
Jason Simmons
4e68860e56 Do not intercept all Android key events (#3149) 2016-10-19 16:46:55 -07:00
Jason Simmons
f4fe2b610e Do not use TouchExplorationStateChangeListener if that API is unavailable (#3148) 2016-10-19 14:59:22 -07:00
Adam Barth
8449f7788f Implement TextInputPlugin on Android (#3144)
This plugin will eventually replace keyboard.mojom.
2016-10-19 12:23:52 -07:00
Adam Barth
be9761268a All the clients have migrated to platform messages (#3142) 2016-10-18 00:57:23 -07:00
Adam Barth
269fd75d56 Route key events through platform messages (#3141)
This will replace raw_keyboard.mojom.
2016-10-17 16:55:42 -07:00
Adam Barth
3bcdaa32b0 Complete routing for Java-to-Dart messages (#3140)
This patch completes the routing for Java-to-Dart platform messages.
2016-10-17 16:47:42 -07:00
Adam Barth
d999f6c123 Remove Activity service (#3136)
This functionality has been replaced by the PlatformPlugin. Also move the
contents of //flutter/services/common to more sensible homes.
2016-10-14 16:12:01 -07:00
Adam Barth
1a40ee953a PointerChange.cancel should have a zero index (#3135)
To make the default state all zeros.

Fixes https://github.com/flutter/flutter/issues/6236
2016-10-14 15:46:46 -07:00
Adam Barth
ebb1a9f999 Add SystemChrome support to PlatformPlugin.java (#3122) 2016-10-12 14:09:18 -07:00
Adam Barth
e93d2c2755 Add PlatformPlugin.java (#3121)
The PlatformPlugin is the first of the built-in plugins that will replace the
mojom platform services.
2016-10-12 13:27:12 -07:00
Adam Barth
e8f57e74a1 Improve new semantics backend (#3113)
TalkBack still isn't fully working, but this patch gets us much closer.
2016-10-11 13:27:11 -07:00
Jason Simmons
d9d2333686 Do not attach and detach the EGL context on each frame in the rasterizer thread (#3110) 2016-10-11 11:14:07 -07:00
Adam Barth
2dc88cc6a5 Switch backend to consume new semantics API (#3103) 2016-10-11 10:52:48 -07:00
Adam Barth
dec24015d7 Add new platform message transport on Android (#3105)
This transport uses the Dart and JNI APIs directly instead of indirecting
through Mojo.
2016-10-07 12:05:43 -07:00
Adam Barth
862d9e9f6b Android should use PointerDataPackets (#3092)
We now use JNI rather than Mojo to transport pointer data from Java to Dart.
Also, fill in a few more of the pointer data fields from information in Java.
2016-10-03 21:02:46 -07:00
Chinmay Garde
9eb446e0d5 Move shell to //flutter and split shell/BUILD.gn into smaller pieces for each subcomponent. (#3053)
* Namespaces have been updated to reflect the move from //flutter/sky/shell to //flutter/shell.
* shell/BUILD.gn file has been split into smaller GN files for each subcomponent of the shell (common, GPU, diagnostic, testing).
* GN dependencies have been rewritten to stop exposing common shell dependencies as public. Duplicates have also been removed.
* GPU subcomponent has been updated make it more suitable for Vulkan integration.
* The GLFW backend has been resurrected.
2016-09-23 15:33:25 -07:00