Skip to content

fix(manifest): Move camera2 feature declaration to scan-enabled flavors - #16468

Merged
alperozturk96 merged 4 commits into
masterfrom
jtr/fix-camera2-manifest-build-overrides
Jul 15, 2026
Merged

fix(manifest): Move camera2 feature declaration to scan-enabled flavors#16468
alperozturk96 merged 4 commits into
masterfrom
jtr/fix-camera2-manifest-build-overrides

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Moving to flavor-specific manifests to avoid warning about tools:node="replace" for builds that don't have scanning/camera2

Eliminates this check (lint) warning:

> Task :app:processGenericDebugMainManifest
/home/runner/work/android/android/app/src/debug/AndroidManifest.xml Warning:
	uses-feature#android.hardware.camera2 was tagged at AndroidManifest.xml:0 to replace another declaration but no other declaration present
  • Tests written, or not not needed

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16468.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@AndyScherzinger

Copy link
Copy Markdown
Member

Hi @joshtrichards @alperozturk96 since we have a general upload Pic via cam in the fab's bottom sheet I would have expected that it is needed in all flavors. Or are we using something else there?

@joshtrichards

Copy link
Copy Markdown
Member Author

@AndyScherzinger I checked the upload-via-camera path: it uses the system camera app via ACTION_IMAGE_CAPTURE / ACTION_VIDEO_CAPTURE, so it doesn't use Camera2. The manifest override is only for the scanning dependency, which declares camera2 as required in scan-enabled flavors.

Moving to flavor-specific manifests to avoid warning about `tools:node="replace"` for builds that don't have scanning/camera2

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@tobiasKaminsky
tobiasKaminsky force-pushed the jtr/fix-camera2-manifest-build-overrides branch from cb63c3a to ecadcf7 Compare July 15, 2026 07:34
@github-actions

Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness6666
Dodgy code213213
Experimental11
Malicious code vulnerability22
Multithreaded correctness2929
Performance4141
Security1919
Total403403

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/29397778752/artifacts/8337173142
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96
alperozturk96 merged commit de63fe5 into master Jul 15, 2026
17 of 22 checks passed
@alperozturk96
alperozturk96 deleted the jtr/fix-camera2-manifest-build-overrides branch July 15, 2026 08:48
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants