Commit Graph

219 Commits

Author SHA1 Message Date
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
Christian Sadilek
49c7f20089 [components] For https://github.com/mozilla-mobile/android-components/issues/4289: Remove promptRequest property from Session 2019-10-02 14:21:02 -04:00
Arturo Mejia
e5b3be8953 [components] For issue https://github.com/mozilla-mobile/android-components/issues/3264 Add api for interacting with the tracking protection
exceptions.
2019-09-27 12:19:57 -04:00
Sebastian Kaspari
e6e0bc1fa4 [components] Issue https://github.com/mozilla-mobile/android-components/issues/4421: Remove download property from Session. 2019-09-25 16:13:25 +02:00
Christian Sadilek
d9bcf47798 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4514: Do not restore parent tab ID for collections 2019-09-24 11:20:52 -04:00
Denys M
b95c932f81 [components] For https://github.com/mozilla-mobile/android-components/issues/4460. Fix detekt warning about license in project files. 2019-09-24 01:01:03 +04:00
MozLando
eb2fcd98bd [components] Merge https://github.com/mozilla-mobile/android-components/pull/4400
4400: Preserve parent id during convert from tab session to state r=rocketsroger a=mawen7



Co-authored-by: mawen7 <mawen7@users.noreply.github.com>
2019-09-18 00:56:12 +00:00
Tiger Oakes
321f2165dc [components] Fix https://github.com/mozilla-mobile/android-components/issues/4418 - Clear manifest on location change 2019-09-16 11:13:48 -07:00
mawen7
0a5d821a03 [components] Preserve parent id during convert from tab session to state 2019-09-13 12:15:56 +02:00
Maurya Talisetti
d4a1170db2 [components] Issue https://github.com/mozilla-mobile/android-components/issues/3663 Clear session icon if URL host changes
Earlier, session icon was cleared whenever URL chagned. But, that resulted in no icon in the scenario of same-host URL redirects. Now, we are clearing session icon only if the scheme and host part of the URL changes.
2019-09-13 09:58:02 +02:00
Christian Sadilek
5102a8be3d [components] Closes https://github.com/mozilla-mobile/android-components/issues/4292: Add FindResult to browser-state 2019-09-11 10:38:02 -04:00
MozLando
f2fdb320b2 [components] Merge https://github.com/mozilla-mobile/android-components/pull/4374
4374: Closes https://github.com/mozilla-mobile/android-components/issues/4290: Add PromptRequest to browser-state r=pocmo a=csadilek

Same as for `Download` and `HitResult` consumables.

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2019-09-11 10:21:44 +00:00
Christian Sadilek
328d4c50a3 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4290: Add PromptRequest to browser-state 2019-09-10 14:13:31 -04:00
Christian Sadilek
e90d04bac1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4348: Empty toolbar after switching from custom tab to browser 2019-09-09 15:08:10 -04:00
Christian Sadilek
961e9d8d6d [components] Closes https://github.com/mozilla-mobile/android-components/issues/3558: browser-state: Add engine session state and keep in sync 2019-09-06 14:10:14 -04:00
Christian Sadilek
0cb71c28fc [components] Make BrowserAction names consistent 2019-09-05 16:11:38 -04:00
Christian Sadilek
9b28cad809 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4284: Sync downloads between browser-session and browser-state
Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
2019-09-04 20:27:04 -04:00
Christian Sadilek
03b4e2e474 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4285: Add HitTarget to browser-state 2019-09-04 16:01:32 -04:00
Sebastian Kaspari
5b175f3c56 [components] Issue https://github.com/mozilla-mobile/android-components/issues/4257, https://github.com/mozilla-mobile/android-components/issues/4279: Move intent related code from browser-session to feature-intent. 2019-09-02 17:39:33 +02:00
Christian Sadilek
b51324ba7d [components] Closes https://github.com/mozilla-mobile/android-components/issues/3544: Add custom tab config to browser-state 2019-08-29 17:51:12 -04:00