Commit Graph

238 Commits

Author SHA1 Message Date
MozLando
74d2b171f3 [components] Merge https://github.com/mozilla-mobile/android-components/pull/6769
6769: Closes https://github.com/mozilla-mobile/android-components/issues/6538: Add navigation state to browser state r=pocmo a=csadilek

Need this for my reader mode refactor :). 

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2020-04-28 13:13:57 +00:00
MozLando
35abfe1203 [components] Merge https://github.com/mozilla-mobile/android-components/pull/6787
6787: Closes https://github.com/mozilla-mobile/android-components/issues/6783: Engine session state is not restored r=pocmo a=csadilek

Regression is fairly recent and my mistake. 

Introduced by this change: 
d4fca7f058 (diff-d386a820f3dab49f970fb183c2a57201)

We now use the wrong key to look up the engine session JSON object. We use `Keys.SESSION_KEY` instead of `Keys.ENGINE_SESSION_KEY`. 🤦 

I've also add a unit test here so this doesn't happen again.  

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2020-04-28 08:29:06 +00:00
Jonathan Almeida
b86fa6dfb5 [components] Close https://github.com/mozilla-mobile/android-components/issues/6601: Update targetSdkVersion to 29 2020-04-28 03:16:54 -04:00
Christian Sadilek
d601e612ae [components] Closes https://github.com/mozilla-mobile/android-components/issues/6783: Engine session state is not restored 2020-04-27 19:57:51 -04:00
Christian Sadilek
3df4ba49df [components] Closes https://github.com/mozilla-mobile/android-components/issues/6538: Add navigation state to browser state 2020-04-27 18:58:27 -04:00
ekager
6e42e586a7 [components] Closes https://github.com/mozilla-mobile/android-components/issues/6651 - Do not restore Session source, adds Session.Source.RESTORED 2020-04-27 10:09:04 -07:00
Christian Sadilek
29d3da1b68 [components] Closes https://github.com/mozilla-mobile/android-components/issues/6584: TabUseCases may call loadUrl twice 2020-04-09 13:22:55 -04:00
Roger Yang
4d09fc463c [components] Close https://github.com/mozilla-mobile/android-components/issues/5795: Support viewport-fit descriptor via onMetaViewportFitChange 2020-04-08 18:19:11 -04:00
Sebastian Kaspari
9312a769b8 [components] Issue https://github.com/mozilla-mobile/android-components/issues/6580: Do not launch media service for muted media.
Co-authored-by: Caleb Everett <everett.caleb@gmail.com>
2020-04-08 16:28:35 +02:00
MozLando
ec3d2bb58f [components] Merge https://github.com/mozilla-mobile/android-components/pull/6568
6568: Close https://github.com/mozilla-mobile/android-components/issues/6567: Return result of block in runWithSessionIdOrSelected r=ekager a=jonalmeida

This is consistent with our behaviour in `runWithSession` and is more in
line with what a consumer would expect.




Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
2020-04-07 23:52:01 +00:00
Jonathan Almeida
ab6f10be22 [components] Close https://github.com/mozilla-mobile/android-components/issues/6567: Return result of block in runWithSessionIdOrSelected
This is consistent with our behaviour in `runWithSession` and is more in
line with what a consumer would expect.
2020-04-07 17:00:51 -04:00
Christian Sadilek
69624c4f41 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4397: Migrate feature-readerview to browser-state 2020-04-06 14:51:20 -04:00
Gabriel Luong
2498983b5d [components] Closes https://github.com/mozilla-mobile/android-components/issues/6352: Add contextId to BrowserState 2020-03-28 00:09:42 -04:00
MozLando
9718d78236 [components] Merge https://github.com/mozilla-mobile/android-components/pull/6362
6362: Issue https://github.com/mozilla-mobile/android-components/issues/4287: Refactor feature-media to use browser-state instead of browser-session. r=csadilek a=pocmo

This is finally ready. :)

With this I completely removed anything related to media from `browser-session` and moved it to `browser-state`. This required a bigger refactoring of `feature-media`. The state machine is gone and that functionality is now provided by a middleware that can be installed on `BrowserStore`.

Note that this also introduces a `Dispatchers` object in `support-base` for creating AC and app specific dispatchers.

Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
2020-03-27 09:50:20 +00:00
Sebastian Kaspari
212ce4a1cc [components] Issue https://github.com/mozilla-mobile/android-components/issues/4287: Refactor feature-media to use browser-state instead of browser-session. 2020-03-26 15:06:35 +01:00
Sebastian Kaspari
d4665f1a6d [components] Issue https://github.com/mozilla-mobile/android-components/issues/5529: Restore engine state of tabs in tab collections. 2020-03-25 16:08:20 +01:00
Christian Sadilek
d34253540a [components] Closes https://github.com/mozilla-mobile/android-components/issues/6315: Include engine session when migrating custom tab 2020-03-19 12:10:30 -04:00
Simon Chae
3e0d4de23a [components] Issue https://github.com/mozilla-mobile/android-components/issues/3832: Add support for additional headers when loading url 2020-03-17 10:28:19 -04:00
codrut.topliceanu
b10be65d61 [components] For https://github.com/mozilla-mobile/android-components/pull/7632 - EngineObserver clear searchTerms when navigating back 2020-03-11 10:47:38 +02:00
Sebastian Kaspari
386640d8c7 [components] Issue https://github.com/mozilla-mobile/android-components/issues/5933: On memory pressure close engine sessions and keep state for restoring later.
Unfortunately the implementation for this needs to live in SessionManager as long as it keeps
references to EngineSession instances and thumbnails. Therefore we determine what to trim in
SessionManager and notify BrowserStore to perform the same changes.

Hopefully in a not to distant future we can move that to BrowserStore.
2020-03-05 12:38:59 +01:00
Sebastian Kaspari
13ab434afe [components] Issue https://github.com/mozilla-mobile/android-components/issues/5933: Create interface for components that support trimming in low memory situations. 2020-03-05 12:37:44 +01:00
Simon Chae
100239143b [components] Closes https://github.com/mozilla-mobile/android-components/issues/6018: Do not load url during link if session is restored 2020-03-02 14:28:48 -05:00
Sebastian Kaspari
821b87e3ce [components] Closes https://github.com/mozilla-mobile/android-components/issues/5966: Migrate browser-icons to use browser-state. 2020-02-19 09:48:42 +01:00
David Walsh
ab2b7f6d37 [components] For https://github.com/mozilla-mobile/android-components/issues/5930 - Don't clear title when hash changes 2020-02-14 16:19:53 -06:00
Christian Sadilek
dc34d27ac1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/5463: Notify GV web ext. controller when active session changes 2020-01-28 14:58:21 +01:00
MozLando
e42ad4f068 [components] Merge https://github.com/mozilla-mobile/android-components/pull/5426
5426: Closes https://github.com/mozilla-mobile/android-components/issues/5425 Support the ACTION_SEARCH Android intent components r=NotWoods,jonalmeida a=salpiras



Co-authored-by: salvatorep <salvatore.piras@intrasonics.com>
2020-01-01 07:47:11 +00:00
salvatorep
79c3248f21 [components] Reduced methods to parse ACTION_SEARCH and condensed ACTION_WEB_SEARCH into ACTION_SEARCH 2020-01-01 03:23:41 +00:00
salvatorep
6e6530fea4 [components] Added ability to process Intent.ACTION_WEB_SEARCH and Intent.ACTION_SEARCH for the IntentProcessor 2019-12-29 15:59:57 +00:00
Tiger Oakes
493e3e7ebd [components] Closes https://github.com/mozilla-mobile/android-components/issues/5408 - Remove manifest when out of scope 2019-12-24 19:06:48 -08:00
Roger Yang
7aca9473f1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/5243: Split AppLinksFeature into feature and interceptor 2019-12-17 15:57:16 -05:00
MozLando
6892d6fe91 [components] Merge https://github.com/mozilla-mobile/android-components/pull/5181
5181: Update Android Gradle plugin and Gradle version. r=jonalmeida a=Amejia481



Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
2019-12-10 02:52:26 +00:00
Roger Yang
60e1084ff7 [components] For https://github.com/mozilla-mobile/android-components/issues/5127: Add Debugging Code to Help Determine Crash Cause 2019-11-29 14:52:48 -05:00
Arturo Mejia
c148451bee [components] Update Android Gradle plugin and Gradle version 2019-11-28 09:54:59 -05:00
Sebastian Kaspari
80ed2c6fbb [components] Closes https://github.com/mozilla-mobile/android-components/issues/5166: SessionStorageTest: Keep reference to lifecycle owner during test run. 2019-11-27 14:21:44 +01:00
MozLando
f1c31a7042 [components] Merge https://github.com/mozilla-mobile/android-components/pull/5125
5125: Closes https://github.com/mozilla-mobile/android-components/issues/4398: Add reader state to browser-state r=pocmo a=csadilek

Closing https://github.com/mozilla-mobile/android-components/issues/4398 to bring in the state required for reader mode so we can port it over soon. Nothing new here, following the existing pattern, and as discussed in https://github.com/mozilla-mobile/android-components/issues/4398#issuecomment-531128780. 

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2019-11-25 18:34:16 +00:00
Christian Sadilek
acb8a8106e [components] Closes https://github.com/mozilla-mobile/android-components/issues/4398: Add reader state to browser-state 2019-11-21 21:16:16 -05:00
Christian Sadilek
a0e1448c48 [components] Closes https://github.com/mozilla-mobile/android-components/issues/5090: Wire up GeckoView action delegate for BrowserActions 2019-11-21 13:24:43 -05:00
Roger Yang
ac7d92a5f9 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4950: Enable Launching URL in Third Party Application 2019-11-16 22:12:58 -05:00
Christian Sadilek
4b57bf0176 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4969: Provide API to observe browser state changes on all tabs 2019-11-07 13:35:49 -05:00
Christian Sadilek
8777fc0c62 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4553: Migrate WindowFeature to browser-state 2019-10-31 15:31:50 -04:00
Christian Sadilek
8e20a15bba [components] Issue https://github.com/mozilla-mobile/android-components/issues/4810: Add tests 2019-10-21 15:25:04 -04:00
MozLando
96cbdc2300 [components] Merge https://github.com/mozilla-mobile/android-components/pull/4798
4798: Set parentId to session before adding tab r=csadilek a=mawen7



Co-authored-by: mawen7 <mawen7@users.noreply.github.com>
2019-10-21 18:22:49 +00:00
MozLando
f1afa5bc4a [components] Merge https://github.com/mozilla-mobile/android-components/pull/4773
4773: Closes https://github.com/mozilla-mobile/android-components/issues/4749: Fix for bug 1522829 r=pocmo a=csadilek

We basically already have the parent session everywhere we need it, we now just forward the corresponding engine session so we can pass it along to GeckoView e.g. when opening a new (regular or private) tab, and when reacting to window requests.

@pocmo one discussion point is whether or not we have to create an engine session for the parent if it's no longer there (e.g. when re-loading a child tab after a restart). I decided **not** to do that as we'd be loading all parent sessions on startup and the child session should already have the right state.

Also, I didn't want to overload the method as named args with default values make this easy enough to read in Kotlin. 

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2019-10-21 16:58:21 +00:00
mawen7
08f35681e4 [components] Set parentId to session before adding tab 2019-10-19 19:11:15 +02:00
Christian Sadilek
a5cc73dd18 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4749: Fix for bug 1522829 2019-10-17 18:44:40 -04:00
Christian Sadilek
a24d7c5287 [components] Closes https://github.com/mozilla-mobile/android-components/issues/3720: Incorrect selection notification when session removed 2019-10-15 16:42:40 -04:00
Arturo Mejia
b64e1891d0 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4469: Add API for supporting WebExtension browserActions 2019-10-11 17:01:52 +02:00
Arturo Mejia
5864df650c [components] For issue https://github.com/mozilla-mobile/android-components/issues/3264 Display the OFF_FOR_A_SITE tracking protection state. 2019-10-07 09:59:19 -04:00
MozLando
e621e9ac8f [components] Merge https://github.com/mozilla-mobile/android-components/pull/4609
4609: Fix find in page not working with fresh install r=csadilek a=VMadalin

### Description
Fixed issue: https://github.com/mozilla-mobile/reference-browser/issues/915

The `engineSession` is null on `FindInPageInteractor` because the `bind()` method set it as null via `session.engineState.engineSession`. 
<img width="752" alt="Screenshot 2019-10-02 at 08 25 39" src="https://user-images.githubusercontent.com/18151158/66025739-799e8e00-e4f7-11e9-944d-73ab86d45485.png">

Finally and after deep research I discover the problem is related with the tabs, when `EngineStateReducer.reduce()` is called for the first time no one has add the new tab created and without it it's imposible to propagate the `GeckoEngineSession` to the `BrowserState`

```
2019-10-02 17:50:58.885 8585-9964/org.mozilla.samples.browser: UnlinkEngineSessionAction
2019-10-02 17:50:58.891 8585-9964/org.mozilla.samples.browser: LinkEngineSessionAction
2019-10-02 17:50:58.919 8585-9964/org.mozilla.samples.browser: AddTabAction  // after link
```

### Pull Request checklist
<!-- Before submitting the PR, please address each item -->
- [x] **Quality**: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
- [x] **Tests**: This PR includes thorough tests or an explanation of why it does not
- [ ] **Changelog**: This PR includes [a changelog entry](https://github.com/mozilla-mobile/android-components/blob/master/docs/changelog.md) or does not need one
- [x] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features

### After merge
- [ ] **Milestone**: Make sure issues closed by this pull request are added to the [milestone](https://github.com/mozilla-mobile/android-components/milestones) of the version currently in development.
- [ ] **Breaking Changes**: If this is a breaking change, please push a draft PR on [Reference Browser](https://github.com/mozilla-mobile/reference-browser) to address the breaking issues.


Co-authored-by: Madalin Valceleanu <devmobile@vmadalin.com>
2019-10-02 22:10:55 +00:00
Madalin Valceleanu
81262f4a2a [components] Closes https://github.com/mozilla-mobile/android-components/issues/4612: Find in page not working when opening tab using TabsUseCases 2019-10-02 23:51:33 +02:00