Reduce duplication by sharing logic for "sizes" in browser-icons
and "sizes" in WebAppManifest, which are supposed to be treated the same
in spec anyways.
This includes UI in private tabs.
Squashed commits:
[180e515e8] Connect to Session Observer and thence to AppLinksFeature.
[77922dcc0] browser-engine-system tests passing
[045717868] lint etc
[6f7b44cad] Thread another Boolean through EngineObserver -> Session onLoadRequest
[18693cad0] Start testing the feature.
[5e0a93556] Fixup tests to use shadow package manager, and catch some new bugs.
[3a5976dde] Split use cases up for menu and intercepting cases.
[f7eae96dd] Address reviewer comments re: dead code and docs
[b15ffb88c] Rename triggeredByUserInteraction to loadRequestTriggeredByUserInteraction
[edc49b573] Move session observer into member of feature
[91ed1f5ac] Add changelog entry
[098dc5067] Add boolean flag to prevent interception of links
[f92731a44] Add load request/trigger by user interaction to session.observer
[46385577d] Move opening to another use case, with test
[56da7e7c1] Change into using feature
[643c9f453] Remove duplicate copyright
[6b3f80bbc] Add testing of get and a fragment for open use cases
[669c84567] Add AppLinksRedirectConfig and supporting use cases.
There is a url redirect creation use case, a load URL use case and an interceptor.
[72896a567] AppLinksUseCases detects if a URL can be opened with another non-browser app
[939eb62fa] Initial commit of empty feature-app-links
Also makes the toolbar unclickable so it can't be switching into
edit mode, and removes all other actions.
Moved the custom tab back button bitmap checking to the feature from the
CustomTabConfig since we needed to know the DisplayMetrics for the
current screen to properly compare it to the max dp value.
Android doesn't kill the process immediately after all foreground activities are gone. So we still have
time to save the state from our background thread.
This also avoids ANRs and issues we saw related to blocking the UI thread, e.g.:
https://github.com/mozilla-mobile/reference-browser/issues/405
- Remove a few unnecessary dependencies
- Add some comments around usage of 'api'
- Mark some of the dependencies as 'api' if they're necessary for use of the module
The main change here is that EngineSessionHolder can now hold an EngineState and this state
is used when we need to create an EngineSession (which will clear the state). This has the
following advantages:
* When restoring we can just attach the EngineState and do not need to create the
EngineSession immediately. With that we do not load all the EngineSessions and everything
at once. Initially only the selected EngineSession will be created and loaded. That will
make the restore faster and use less resources when restoring a lot of sessions.
* (Not in this commit, for a follow-up) It allows us to close EngineSession instances and
just keep the EngineState around until we need the EngineSession again. That's something
we could do in low memory situations or when there are just too many sessions/tabs open
to be performant (e.g. only keep the last recently used EngineSession instances around).