Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ enum class ModelOption(
ApiProvider.GOOGLE,
"https://huggingface.co/na5h13/gemma-3n-E4B-it-litert-lm/resolve/main/gemma-3n-E4B-it-int4.litertlm?download=true",
"4.92 GB",
supportsScreenshot = true,
isOfflineModel = true,
offlineModelFilename = "gemma-3n-e4b-it-int4.litertlm",
offlineRequiredFilenames = listOf("gemma-3n-e4b-it-int4.litertlm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,10 @@ fun PhotoReasoningScreen(
return@IconButton
}

// Check MediaProjection for all models except offline and human-expert
// Human Expert uses its own MediaProjection for WebRTC, not ScreenCaptureService
if (!isMediaProjectionPermissionGranted && !com.google.ai.sample.GenerativeAiViewModelFactory.getCurrentModel().isOfflineModel && modelName != "human-expert") {
// Check MediaProjection only for models that support screenshots and are not human-expert.
// Human Expert uses its own MediaProjection for WebRTC, not ScreenCaptureService.
val currentModel = com.google.ai.sample.GenerativeAiViewModelFactory.getCurrentModel()
if (!isMediaProjectionPermissionGranted && currentModel.supportsScreenshot && modelName != "human-expert") {
mainActivity?.requestMediaProjectionPermission {
// This block will be executed after permission is granted
if (userQuestion.isNotBlank()) {
Expand Down
Loading