Skip to content

Feat/ask for microphone perm - #339

Closed
ssidimoh694 wants to merge 19 commits into
mainfrom
feat/ask-for-microphone-perm
Closed

ssidimoh694 wants to merge 19 commits into
mainfrom
feat/ask-for-microphone-perm

Conversation

@ssidimoh694

@ssidimoh694 ssidimoh694 commented Dec 18, 2025 •

Copy link
Copy Markdown
Contributor

#340

Title: feat: request microphone permission for voice confirmation

Summary:
Add microphone permission request when enabling Voice Confirmation in Danger Mode preferences.

What I changed:

  • Trigger the OS permission request for microphone when the user toggles the Voice Confirmation switch.
  • Wire the permission launcher in DangerModePreferences.kt and set the pending action so the ViewModel can handle isOsRequestInFlight.
  • Keep Voice Confirmation UI as local state while ensuring the permission flow is correctly started and resolved.
  • Add an instrumented test voiceConfirmationToggle_requestsMicrophonePermission_whenNotGranted in app/src/androidTest/.../DangerModePreferencesScreenTest.kt to cover the flow.

Files touched:

  • app/src/main/java/.../profile/preferences/DangerModePreferences.kt
  • app/src/main/java/.../features/dashboard/DangerModeCardViewModel.kt (permission sequence / handling)
  • app/src/androidTest/java/.../DangerModePreferencesScreenTest.kt (new/updated test)

Notes:

  • No change in other feature behaviors.
  • Tests verify the permission popup flow and isOsRequestInFlight handling.

@ssidimoh694 ssidimoh694 self-assigned this Dec 18, 2025
@ssidimoh694 ssidimoh694 added the enhancement New feature or request label Dec 18, 2025
@ssidimoh694 ssidimoh694 added this to the M3 milestone Dec 18, 2025
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ssidimoh694

Copy link
Copy Markdown
Contributor Author

Duplicate. Same branch with other name as feat/micro-ask-perm

@ssidimoh694
ssidimoh694 deleted the feat/ask-for-microphone-perm branch December 18, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request permission in DangerModePreferenceScreen on activating voice confirmation

3 participants