Application services is going to switch to rapid-release / train style
model where:
- The version numbers correspond to the Fx version (113.x for the
current nightly cycle).
- There are nightly builds for the current nightly release (for
example 113.[timestamp]
- At the end of the nightly release cycle, there's a release (for
example 113.0)
- There may be subsequent releases if changes are uplifted (for
example 113.1)
- Updated the gradle code to handle the new system. The application
services versioning is stored in the version/channel fields of the
`ApplicationServicesConfig` object.
- Updated the gradle code to fetch packages from the Maven
nightly/staging repos if needed.
- Updated relbot to 6.1.0. This is needed to handle the a-s nightly
version bump.
- Updated creating-a-release-branch docs
* Bug 1824434 - Improve visibility of license info
We are upstreaming some of the code that was vendored into Fenix, to be
shared from components, so that Focus can use it as well.
Why is this a new component? Inspecting our existing components, this
code doesn't fall under the concept of a "feature", and more closely
relates to being a "support" one instead. With that in mind, there
isn't a good existing support component to fold this into either.
There is also room for improvement in this component to include the
plugin or other license-related helpers.
* Bug 1824434 - Add UI tests for license menus
---------
Co-authored-by: dsmithpadilla <88508950+dsmithpadilla@users.noreply.github.com>
From ohall's learnings, we know that we need to use the original Android
Activity Context with the system PrintManager. When a configuration
change happens, a new Context is created and the original is lost.
The most straight-forward way to do that is to use a ContextWrapper
which internally holds a reference to the original context.
These dependencies are not needed and for some reason this fixes the
build failure we are seeing on CI that is expecting the artifact
`androidx.test:monitor:1.4.0`.
This bug implements the GeckoView.ActivityContextDelegate in AC. The
purpose of this feature is to give GeckoView access to the containing
activity to start a PrintManager (or for potential other uses). Not to
be confused with the runtime delegate of GeckoActivityDelegate, which is
tightly tied to webauthn.
The new system was merged in #12266 and we have started using it for all
components in app-services. I've been checking the Sentry reports and
it seems like it's working, so let's remove the old one.
Upgrade kotlin to 1.7.20, coroutines to 1.6.4 and compose compiler to 1.3.2.
Replace deprecated Xopt-in with op-in.
Replace deprecated Xjvm-default=enable with Xjvm-default=all.
Remove useIR property that is now default true.
Image sharing currently only works when sharing to an app but not when
using the Android Direct Share feature, where it fails with a
SecurityException.
"Direct Share" is what Android calls the app created shortcuts,
i.e. individual chats from a messaging application.
The code pretty much already does the right thing (i.e. setting
the FLAG_GRANT_READ_URI_PERMISSION on the target intent as well as the
Chooser action, as described in ACTION_CHOOSE Api docs[1]) but there's
some platform internals that seem to go wrong here but we can work
around it with this patch.
https://issuetracker.google.com/issues/151386328 describes a similar
Problem, especially https://github.com/mozilla-mobile/android-components/issues/12 in there offers a similar workaround and an
explanation:
The underlying problem is that ACTION_SEND is using EXTRA_STREAM for the
content URI. But the FLAG_GRANT_*_URI_PERMISSION mechanism only works
with URIs in Intent.data and Intent.clipData. The framework contains
some code that tries to work around this limitation. But it doesn't
handle this particular case. Intent.createChooser() migrates the flags
and data/clipData from the target Intent, but it does so before the
framework had a chance to fix up the target Intent via Intent.migrateExtraStreamToClipData().
And indeed moving the clipData into the inner intent makes Direct Share
work and preserves the image preview in the Intent.
[1] file:///<SDK-DIR>/docs/reference/android/content/Intent.html#ACTION_CHOOSER
If you need to grant URI permissions through a chooser, you must specify
the permissions to be granted on the ACTION_CHOOSER Intent in addition to
the EXTRA_INTENT inside. This means using setClipData(ClipData) to
specify the URIs to be granted as well as FLAG_GRANT_READ_URI_PERMISSION
and/or FLAG_GRANT_WRITE_URI_PERMISSION as appropriate.
Adds support for Save to PDF from the GeckoSession by plugging the
API into `onExternalResponse` to provide the same flow as a typical
file download experience would be.
Co-authored-by: Olivia Hall <ohall@mozilla.com>
* For https://github.com/mozilla-mobile/android-components/issues/12544: Allow screen to turn off after media is paused/stopped
This fix allows the device to sleep when the media being played is paused/stopped after the system screen timeout is passed
Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
Co-Authored-By: Mihai Adrian Carare <48995920+mcarare@users.noreply.github.com>
* For https://github.com/mozilla-mobile/android-components/issues/12544: Allow screen to turn off after media is paused/stopped
This fix allows the device to sleep when the media being played is paused/stopped after the system screen timeout is passed
Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
Co-Authored-By: Mihai Adrian Carare <48995920+mcarare@users.noreply.github.com>
Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
Co-authored-by: Mihai Adrian Carare <48995920+mcarare@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
A change in AS v93.6.0 made it so the underlying function
`LoginsStore.import_multiple` no longer returns the metrics as a JSON
string string. Instead it just encodes the unit struct. This was a
breaking change, but it's not listed properly in the CHANGELOG.
The fix is pretty simple: just assume that no logins failed to import.
- Added new component that hooks into the new app-services error
reporter and listens for events. When it sees an event it submits it
to the crash reporter.
- Added support for customizing crash reports for these errors.
Moved the tests for string preferences to a new file where we can use
Robolectric for just this preferences type and test the actual behavior without
relying on mocking which would prevent full testing the change because of the
two readings using a `null` default.
Used `runTestOnMain` where `MainCoroutineRule` was used or needed to be used,
`runTest` elsewhere.
Extra effort for removing all `runBlocking` occurrences in unit tests.
`kotlinx.coroutines.test.runTest` is a test specific API that seems like a more
appropriate way for running tests in a coroutine than the general
`kotlinx.coroutines.runBlocking` api.
- Refactor out all usages of TestCoroutineDispatcher and TestCoroutineScope
- Refactor MainCoroutineRule to now use UnconfinedTestDispatcher by default.
This dispatcher will eagerly enter all launch or async blocks being more suited
to our codebase.
- Introduces `CreditCardValidationDelegate` and a default implementation in `DefaultCreditCardValidationDelegate`
- Implements `onCreditCardSave` in `GeckoCreditCardsAddressesStorageDelegate`
- Refactors `CreditCard` from concept-engine to `CreditCardEntry` in concept-storage so that it can validated with the `CreditCardValidationDelegate`
Added support for branch-build settings in `local.properties`:
- If `branchBuild.android-components.version` is set, then we
set the android-components version to that exact string.
- If `branchBuild.application-services.dir` is set, then run
`build-scripts/substitute-local-appservices.gradle` script, like we
do with `autoPublish`. However, in this case, that script expects
the app-services packages to be be built ahead of time with a
specific version name specified by
`branchBuild.application-services.version`.
- Added support for the absolute paths when running the substutition
scripts.
- Updated `substitute-local-ac.gradle` to check the
`localProperties.branchBuild.android-components.version`.
The plan is to use this feature to build/test fenix using a particular
checkout of application-services and androd-components, with the
versions set to the git commit ID.
This also required updating room to >= 2.4.0.
This new version adds a deprecation of the `MigrationTestHelper` api used in
`LoginExceptionStorageTest` that is to be later fixed in https://github.com/mozilla-mobile/android-components/issues/11765.
`activity_compose` was also update to the latest stable version to ensure a
better match with the latest stable version for compose.
Used 1.6.10 for Kotlin although 1.6.20 is available to prevent any issues with
Compose 1.1.1 reported as an error at compile time:
"e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10
but you appear to be using Kotlin version 1.6.20 which is not known to be
compatible. Please fix your configuration (or
`suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!)."