This commit ensures that we can drop files (photos, videos, and audio) in NoteEditor (FixedEditText).
Fix: Handle minSdkVersion conflict with DropHelper and enable file drop in NoteEditor
Added DropHelperCompat to handle the incompatibility issue with DropHelper and minSdkVersion 23. The manifest merger failed with the following error:
> Manifest merger failed: uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [androidx.draganddrop:draganddrop:1.0.0] /Users/davidallison/.gradle/cache> s/8.8/transforms/0a1688833d368c1b9b07d2054911030e/transformed/draganddrop-1.0.0/AndroidManifest.xml as the library might be using APIs not available in 23
> Suggestion: use a compatible library with a minSdk of at most 23,
> or increase this project's minSdk version to at least 24,
> or use tools:overrideLibrary="androidx.draganddrop" to force usage
> (may lead to runtime failures)
To resolve this, the DropHelperCompat class is used to conditionally configure the view for drag and drop operations only when the SDK version is 24 or higher.
* refactor: viewModel to use generic media terms and livedata
* refactor: use reselect string instead of restart
* refactor: extract MenuProvider class
* refactor: show multimedia bottomsheet in case result is cancelled
The plugin hasn't been updated for quite some time and it currently
breaks the build and apk publishing. This PR removes it along its
configuration and any additional setup code.
The plugin was already removed from the publishing process as it
didn't work anymore. See https://github.com/ankidroid/Anki-Android/issues/14161
required me to build release with production signing key locally
for upload vs on CI so I could manually work through foreground
service justification process on Play Console
we are unable to depend on them in androidTestImplementation terms
because android gradle plugin has a bug that breaks coverage with
a shared test/androidTest dep
we want the code to be truly shared though and just need to work around
the issue temporarily (we hope)
so a build-time copy seems the least-worst alternative
Some notes:
- added the back arrow from the vector assets IDE library to replace
the one used from the library
- replaced md_title_textsize with title_textsize, they have the same value, see
709cfee9b4/core/src/main/res/values/dimens.xml (L28)
* build(deps): bump androidx.core:core-ktx from 1.12.0 to 1.13.0 (#16202)
* Reapply "Dependency updates 20240417 (#16193)"
This reverts commit a75ef34cf9.
* build(deps): bump androidx.core:core-ktx from 1.12.0 to 1.13.0
Bumps androidx.core:core-ktx from 1.12.0 to 1.13.0.
---
updated-dependencies:
- dependency-name: androidx.core:core-ktx
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* refactor: use same named parameter name as overridden method
else we get build warnings which we consider errors
* refactor: call View.generateViewId directly to handle deprecation
* refactor: handle CancellationSignal type ambiguity from deprecation by pinning w/declaration
attempting to cast it inline with `as CancellationSignal` results in "cast never succeeds"
warnings which are unsightly
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump com.squareup.leakcanary:leakcanary-android
Bumps [com.squareup.leakcanary:leakcanary-android](https://github.com/square/leakcanary) from 2.13 to 2.14.
- [Release notes](https://github.com/square/leakcanary/releases)
- [Changelog](https://github.com/square/leakcanary/blob/main/docs/changelog.md)
- [Commits](https://github.com/square/leakcanary/compare/v2.13...v2.14)
---
updated-dependencies:
- dependency-name: com.squareup.leakcanary:leakcanary-android
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump lint from 31.3.2 to 31.4.0
Bumps `lint` from 31.3.2 to 31.4.0.
Updates `com.android.tools.lint:lint-api` from 31.3.2 to 31.4.0
Updates `com.android.tools.lint:lint` from 31.3.2 to 31.4.0
Updates `com.android.tools.lint:lint-tests` from 31.3.2 to 31.4.0
---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint-tests
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump androidGradlePlugin from 8.3.2 to 8.4.0
Bumps `androidGradlePlugin` from 8.3.2 to 8.4.0.
Updates `com.android.application` from 8.3.2 to 8.4.0
Updates `com.android.library` from 8.3.2 to 8.4.0
---
updated-dependencies:
- dependency-name: com.android.application
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: com.android.library
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump androidx.activity:activity-ktx from 1.8.2 to 1.9.0 (#16201)
* build(deps): bump androidx.activity:activity-ktx from 1.8.2 to 1.9.0
Bumps androidx.activity:activity-ktx from 1.8.2 to 1.9.0.
---
updated-dependencies:
- dependency-name: androidx.activity:activity-ktx
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* refactor: use activity directly, all ktx extensions in main dep now
Per release notes:
> The remainder of the Activity APIs have been rewritten in Kotlin and
> all extensions previously available in activity-ktx have been moved
> to activity. activity-ktx is now completely empty.
* refactor: handle Intent nullability changes
* fix: [set/add]ContentView nullability change
* fix: onBackPressed deprecation
* fix: further onBackPressed deprecation
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
* test: remove RobolectricTestAnnotationTest
We're going to introduce WorkManagerTestInitHelper and it's
outlived its usefulness
Change to a check on `setUp`
* feat: show that media is running in-app
useful if the user has notifications disabled
* fix: sync badges
---------
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
* version catalog conflict
solve
* implementing version catalog for stable versioning between modules
* implementing version catalog for stable versioning between modules
---------
Co-authored-by: abdelrahmanesam <abdelrahmanesam>
I'm using WorkManager as the persistent job solution for the issue since it was more versatile and backwards compatible than the other option that Android proposes for data sync, that is [user initiated data jobs](https://developer.android.com/about/versions/14/changes/user-initiated-data-transfers)
Also, it has a variety of APIs for setting the work in different conditions, like internet connection and battery level, which are relevant to syncing
note: this doesn't handle the previous MediaSyncListener call that resumed the scoped storage migration process, since the migration apparatus should be removed relatively soon and therefore it isn't worth my time (nor anyone's else IMO)
So, if this is deemed as necessary for merging, consider this as `Needs a new dev` or wait for the migration code to be removed.
as part of the release pipeline failure previously, the build version
commit did not land on main, so our version in source on main is stale
vs the version already out in alpha channel, causing all releases to fail
as the version has been used