Code RoomRuntime permission not checked
MediumPrep Room Coding #4210

Runtime permission not checked

Vibe & agenticSecurityMid–Senior~16 min

An AI wrote this Android camera-capture code. It works on the dev's device (camera already granted), but on a fresh install it crashes with a SecurityException the first time the user taps 'Take photo', even though the permission is declared in the manifest. What's wrong and how would you fix it?

Implement
next_permission_action(manifest_declared: bool, granted: bool, denial_count: int) → str
Examples
in[true,false,0]out"request_permission"
in[true,true,0]out"open_camera"
in[true,false,2]out"open_app_settings"
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 16 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.