Skip to content

Remove call blur feature for generic flavor#6377

Open
mahibi wants to merge 3 commits into
masterfrom
excludeMediaPipeForGeneric
Open

Remove call blur feature for generic flavor#6377
mahibi wants to merge 3 commits into
masterfrom
excludeMediaPipeForGeneric

Conversation

@mahibi

@mahibi mahibi commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

fix #6376

Checked the generic build with the fdroid scanner. It's fine now.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@mahibi mahibi requested a review from rapterjet2004 June 22, 2026 14:36
@mahibi

This comment was marked as outdated.

@mahibi mahibi changed the title Exclude media pipe for generic Exclude media pipe for generic flavor Jun 22, 2026
mahibi added 2 commits June 23, 2026 18:56
com.google.mediapipe:tasks-vision pulls in com.google.android.datatransport.
This transitively brings firebase-encoders. That is rejected by F-Droid.

See the failiing build https://gitlab.com/fdroid/fdroiddata/-/jobs/14758239564

Search for the dependency to see which pulls it in:

./gradlew :app:dependencyInsight --configuration genericDebugRuntimeClasspath --dependency com.google.firebase:firebase-encoders
Configuration on demand is an incubating feature.
Calculating task graph as no cached configuration is available for tasks: :app:dependencyInsight --configuration genericDebugRuntimeClasspath --dependency com.google.firebase:firebase-encoders

> Configure project :app
WARNING: The option setting 'android.newDsl=false' is deprecated.
The current default is 'true'.
It will be removed in version 10.0 of the Android Gradle plugin.
WARNING: The option setting 'android.enableJetifier=true' is deprecated.
The current default is 'false'.
It will be removed in version 10.0 of the Android Gradle plugin.

> Task :app:dependencyInsight
com.google.firebase:firebase-encoders:17.0.0
  Variant runtime:
    | Attribute Name                                         | Provided     | Requested    |
    |--------------------------------------------------------|--------------|--------------|
    | org.gradle.libraryelements                             | jar          |              |
    | org.gradle.status                                      | release      |              |
    | org.gradle.category                                    | library      | library      |
    | org.gradle.usage                                       | java-runtime | java-runtime |
    | com.android.build.api.attributes.AgpVersionAttr        |              | 9.2.1        |
    | com.android.build.api.attributes.BuildTypeAttr         |              | debug        |
    | com.android.build.api.attributes.ProductFlavor:default |              | generic      |
    | org.gradle.jvm.environment                             |              | android      |
    | org.jetbrains.kotlin.platform.type                     |              | androidJvm   |

com.google.firebase:firebase-encoders:17.0.0
+--- com.google.android.datatransport:transport-backend-cct:3.1.0
|    \--- com.google.mediapipe:tasks-core:0.10.26
|         \--- com.google.mediapipe:tasks-vision:0.10.26
|              \--- genericDebugRuntimeClasspath
+--- com.google.android.datatransport:transport-runtime:3.1.0
|    +--- com.google.mediapipe:tasks-core:0.10.26 (*)
|    \--- com.google.android.datatransport:transport-backend-cct:3.1.0 (*)
+--- com.google.firebase:firebase-encoders-json:18.0.0
|    \--- com.google.android.datatransport:transport-backend-cct:3.1.0 (*)
\--- com.google.firebase:firebase-encoders-proto:16.0.0
     \--- com.google.android.datatransport:transport-runtime:3.1.0 (*)

com.google.firebase:firebase-encoders-json:18.0.0
  Variant runtime:
    | Attribute Name                                         | Provided     | Requested    |
    |--------------------------------------------------------|--------------|--------------|
    | org.gradle.libraryelements                             | jar          |              |
    | org.gradle.status                                      | release      |              |
    | org.gradle.category                                    | library      | library      |
    | org.gradle.usage                                       | java-runtime | java-runtime |
    | com.android.build.api.attributes.AgpVersionAttr        |              | 9.2.1        |
    | com.android.build.api.attributes.BuildTypeAttr         |              | debug        |
    | com.android.build.api.attributes.ProductFlavor:default |              | generic      |
    | org.gradle.jvm.environment                             |              | android      |
    | org.jetbrains.kotlin.platform.type                     |              | androidJvm   |

com.google.firebase:firebase-encoders-json:18.0.0
\--- com.google.android.datatransport:transport-backend-cct:3.1.0
     \--- com.google.mediapipe:tasks-core:0.10.26
          \--- com.google.mediapipe:tasks-vision:0.10.26
               \--- genericDebugRuntimeClasspath

com.google.firebase:firebase-encoders-proto:16.0.0
  Variant runtime:
    | Attribute Name                                         | Provided     | Requested    |
    |--------------------------------------------------------|--------------|--------------|
    | org.gradle.libraryelements                             | jar          |              |
    | org.gradle.status                                      | release      |              |
    | org.gradle.category                                    | library      | library      |
    | org.gradle.usage                                       | java-runtime | java-runtime |
    | com.android.build.api.attributes.AgpVersionAttr        |              | 9.2.1        |
    | com.android.build.api.attributes.BuildTypeAttr         |              | debug        |
    | com.android.build.api.attributes.ProductFlavor:default |              | generic      |
    | org.gradle.jvm.environment                             |              | android      |
    | org.jetbrains.kotlin.platform.type                     |              | androidJvm   |

com.google.firebase:firebase-encoders-proto:16.0.0
\--- com.google.android.datatransport:transport-runtime:3.1.0
     +--- com.google.mediapipe:tasks-core:0.10.26
     |    \--- com.google.mediapipe:tasks-vision:0.10.26
     |         \--- genericDebugRuntimeClasspath
     \--- com.google.android.datatransport:transport-backend-cct:3.1.0
          \--- com.google.mediapipe:tasks-core:0.10.26 (*)

(*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation.

----

The fix is to exclude com.google.android.datatransport

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…K scan

  com.google.mediapipe:tasks-vision (used for background blur) transitively
  pulls in com.google.firebase:firebase-encoders* via
  com.google.android.datatransport, which F-Droid's APK scanner rejects.
  Excluding datatransport entirely breaks MediaPipe initialization; excluding
  only firebase-encoders causes a fatal crash in CctTransportBackend.<init>
  because it instantiates JsonDataEncoderBuilder directly in its constructor.
  The only viable fix is to keep MediaPipe out of the generic (F-Droid) build:
  - Move tasks-vision to gplayImplementation
  - Split ImageSegmenterHelper into a gplay source set (real) and a generic
    source set (no-op stub with the same API surface)
  - Add BuildConfig.BACKGROUND_BLUR_ENABLED (false for generic, true otherwise)
    to hide the blur button and skip the video processor observer

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the excludeMediaPipeForGeneric branch from 87f1123 to d8b14f5 Compare June 23, 2026 17:00
  LoganSquare's kapt annotation processor generates List<long> for LongArray
  fields, which is invalid Java — generics require the boxed type. This caused
  a compile failure in compileGenericDebugJavaWithJavac.
  List<Long> serializes identically over JSON and works correctly with LoganSquare's code generator.
  Why it's necessary: LoganSquare is a Java annotation processor. When it sees LongArray (a Kotlin type that maps to long[] in Java),
  it tries to generate list serialization code using the primitive long as the generic type parameter — producing
  List<long>, which Java's type system rejects. List<Long> (boxed) is the correct form for generics. The JSON wire format is unchanged; it's purely a codegen quirk.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi self-assigned this Jun 23, 2026
@mahibi mahibi added the 3. to review Waiting for reviews label Jun 23, 2026
@mahibi mahibi modified the milestones: 24.0.2, 24.1.0 Jun 23, 2026
@mahibi mahibi marked this pull request as ready for review June 23, 2026 17:53
@mahibi mahibi requested a review from sowjanyakch June 23, 2026 17:55
@mahibi mahibi changed the title Exclude media pipe for generic flavor Remove call blur feature for generic flavor Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calls background blur not compatible with fdroid

1 participant