8049: For https://github.com/mozilla-mobile/android-components/issues/6099 - Convert config to yaml r=pocmo a=NotWoods
In Gradle 6, buildSrc classes cannot be used inside settings.gradle. Inlining the `Config` class gets around this problem for us. The values inside the class have been moved to a YAML file so that it can be used by Taskcluster to check if data has changed, and used by the changelog to be a simple version overview.
We could also use a .properties file for this.
Co-authored-by: Tiger Oakes <toakes@mozilla.com>
* Instead of keeping the EngineSessionState inside EngineSession, we now always attach it to EngineState and also do not
clear it anymore.
* If the content process gets killed we now just suspend affected EngineSession instances. They will automatically and
lazily get restored from the last EngineSessionState once needed.
* On a content process crash we now mark the EngineState as crashed and suspend the EngineSession. We will not restore
the EngineSession until explicitly restored by the application.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
Issue https://github.com/mozilla-mobile/android-components/pull/8121: Replace MigrationStore with MigrationContext and prevent usage outside of a Middleware.
* Before executing the reducer chain we now verify that we are on the store thread and throw if we are on a different thread.
* MigrationContext now provides a store property that returns the underlying Store instance. This can be used to pass it to
other components and threads that are not part of the Middleware.
* Fixed existing Middleware implementations to use the MiddlewareContext or pass the actual Store instance around.
6547: Closes https://github.com/mozilla-mobile/android-components/issues/4397: Migrate feature-readerview to browser-state r=pocmo a=csadilek
@pocmo Super happy with how the middleware worked out. It basically maps state to other (action/state), as relevant to reader view e.g. the url has changed -> a new reader check is required.
The other cases handled by the middleware are:
- User opens a tab via the context menu (may or may not switch to it directly)
- A new tab is selected
- A tab is removed (see comment in middleware)
All other functionality remains the same. Diff is big mostly because of test refactorings :)
I found another way that allows us to remove all reader state from the session right away! I am storing the state in the snapshot directly (same as `engineState`) and let the `SessionManager` deal with adding/deleting it based on the state in the store. This way we don't need to pass the store along to the serializer / session storage.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
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.
6034: Closes https://github.com/mozilla-mobile/android-components/issues/6011: Integrate DebuggerDelegate to support temporary extensions r=Amejia481 a=csadilek
GeckoView calls us back now when a debug / temporary extension was installed so we can refresh the list of installed extensions to make sure action handlers are hooked up.
We're gonna have to uninstall all extensions and call `listInstalledExtensions` again to re-install everything that is there now incl. the new temporary extension. This is fine as it's for debugging purposes only.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>