78 Commits

Author SHA1 Message Date
Jonah Williams
e1cd506187
add onStart hook which places flutter in an inactive state (#5177) 2018-05-04 14:46:57 -07:00
Jonah Williams
0b7d6be976
Re-land "do not pause rendering when android view loses focus" (#5004)
* do not pause rendering when android view loses focus
2018-04-13 17:08:00 -07:00
Jonah Williams
8a6e64a8ef
Revert "Do not pause rendering when android activity loses focus (#4848)" (#4985)
This reverts commit c83d1ef12df0cf8b11a6dda044f812f8cc6c16ef.
2018-04-12 11:20:24 -07:00
Jonah Williams
c83d1ef12d
Do not pause rendering when android activity loses focus (#4848)
* do not pause rendering when android view loses focus
2018-04-12 11:00:31 -07:00
Jason Simmons
5e8557330a
Allow FirstFrameListeners to remove themselves from the FlutterView's list (#4871)
Fixes https://github.com/flutter/flutter/issues/15884
2018-03-26 15:43:38 -07:00
Sarah Zakarias
2c5a1bf507
Provide lookup key to access Flutter assets in the APK (#4785) 2018-03-16 12:59:57 +01:00
Michael Goderbauer
5ce89a0f3d
Fixes crash on Android when activating Now on Tap (#4536) 2018-01-12 10:22:55 -08:00
Alexander Aprelev
6bacf4522e
This adds RPC call to set asset path. (#4323)
* This adds rpc call to simply set asset path.

This is needed when doing hot reload to pick up updated assets.

* Move asset_directory fetch for after view_id. Clean up return. Fix formatting.

* Add SetAssetBundlePath methods implementations for mac and ios

* Fix mac mm

* Fix formatting

* Merge and use nullptr
2018-01-04 09:48:01 -08:00
Michael Goderbauer
e07eafae1d
Roll forward: Parameters for SemanticActions; a11y text selection (#4452)
Reverts the revert in #4448 with fixes to pass on the bot.

This change will require framework changes in flutter/flutter#13490.
2017-12-12 14:25:45 -08:00
Chris Bracken
6c6b709b2c
Model Android keyboard height as view inset (#4447)
Model top and side system insets as padding and bottom (keyboard) as a
view inset. This avoids applying system insets twice (once as an inset,
once as padding).
2017-12-12 11:04:42 -08:00
Michael Goderbauer
056fd4597f
Revert " Add parameters to SemanticActions; implement extend selection for a11y (#4444)" (#4448)
This reverts commit 59c3a37e6436d60381d9708113228c83ccc6b7f9.
2017-12-12 10:53:15 -08:00
Michael Goderbauer
59c3a37e64
Add parameters to SemanticActions; implement extend selection for a11y (#4444) 2017-12-12 10:06:04 -08:00
Jason Simmons
aaa758d619
Check for a detached FlutterNativeView before sending messages (#4445)
Fixes https://github.com/flutter/flutter/issues/13481
2017-12-11 17:15:21 -08:00
Michael Goderbauer
fb44dce8c2
A11y cursor movements for text fields on Android (#4419)
* a11y cursor movement by character

* focus fixes

* doc fixes
2017-12-06 15:46:35 -08:00
Zachary Anderson
619f452ece
[Android] Extract the PluginRegistry from the FlutterActivity (#4393) 2017-11-30 11:05:55 -08:00
Chris Bracken
93648ef0ed
Expose Window.viewInsets in dart:ui (#4403)
Window.viewInsets is the set of window-relative insets that describe the
area of the window that an application may want to treat as effectively
reducing the size of the content. Typically this is due to system UI
that fully obscures underlying content, such as the keyboard.

This area differs from padding in that padding is the set of insets that
describe the area of the window that may be partially (or fully)
obscured by system UI or physical intrusions into the view area (e.g.
iPhone X sensor housing, status bar, or the iPhone X home indicator
widget).

This patch does not yet enable the iOS bottom edge safe area. Once the
framework has been updated to use viewInsets for bottom-edge occlusions
(today, the keyboard), the bottom safe area will be enabled and
framework patches that depend on it, landed.
2017-11-29 16:27:15 -08:00
Zachary Anderson
7804e8588a
View destroy listener (#4347)
[Android] Allow persisting a FlutterNativeView across activities.
2017-11-13 13:56:48 -08:00
Jason Simmons
bb55d65085
Delete the native view when destroying the FlutterView (#4356)
Fixes https://github.com/flutter/flutter/issues/12996
2017-11-13 13:16:48 -08:00
Zachary Anderson
f5bdf9b0fc
[Android] Pulls the native platform view out of FlutterView (#4338) 2017-11-09 12:10:00 -08:00
Chinmay Garde
9a960f82f5 Add texture support (eg video, camera) (#4159) 2017-11-02 10:57:29 +01:00
Zachary Anderson
57f361dc6a Pass option to reuse an existing runtime controller (#4253) 2017-10-20 10:17:21 -07:00
Yegor
23f5ccd25c Add alwaysUse24HourFormat and textScaleFactor (#4202)
* systems/settings channel split

* merge textScaleFactor and alwaysUse24HourFormat into flutter/settings channel

* add debugOverrideAlwaysUse24HourFormat

* implement textScaleFactor on iOS

* address comments

* remove debugOverrideAlwaysUse24HourFormat

* clang-format
2017-10-18 16:13:43 -07:00
Zachary Anderson
d3ebce9cf6 Allow a non-main entrypoint (#4238) 2017-10-18 14:19:28 -07:00
Zachary Anderson
faaf321b01 Make Engine::RunBundle* reuse an existing RuntimeController (#4229) 2017-10-17 13:44:09 -07:00
gspencergoog
b2a7f4bf8f Add support for system text scale factor. (#4124)
Adds support for system text scale factor, including hooks for Android system settings changes.  iOS hooks will be added in another PR.
2017-09-29 13:19:06 -07:00
Jason Simmons
77ec0b5f5b Replace a View.getDisplay call that is not supported on API level 16 (#4139)
Fixes https://github.com/flutter/flutter/issues/12235
2017-09-25 11:25:47 -07:00
Jason Simmons
a44146f13b Log instead of asserting when sending a reply message to a defunct engine (#4084)
Fixes https://github.com/flutter/flutter/issues/12037
2017-09-11 14:05:14 -07:00
Ryan Macnak
ffbefaf477 Initial implementation of idle notification. (#4012)
- Assumes only the Dart VM is interested in idle notification.
 - Gives the VM the time remaining in each frame.
 - Gives the VM 100ms if there is no pending frame.

Issue flutter/flutter#9594
2017-09-01 11:11:25 -07:00
Jason Simmons
0223e293f2 Improve checks for calls into native code made after the platform view has been detached (#3926) 2017-08-17 10:24:12 -07:00
xster
f187a5c219 Create platform API for first frame callback. Use for defer hiding splash screens on Android and iOS (#3956)
* Add back launch screen view until first frame on iOS

* improvements

* Move callback plumbing from ios surfaces to the gpu rasterizer. Didn’t wire java JNI yet.

* Android JNI

* Fix ios reference count and let android engine manage a view on top with launch screen

* Hook up Android activity and view

* review notes

* review notes

* Move thread switching upstream. Use weak references for callbacks.

* Some clean up
2017-08-14 15:44:52 -07:00
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