Skip to content

Commit

Permalink
[VC] fixing permission with capturing.
Browse files Browse the repository at this point in the history
We have seen cases that camera/microphone is accessed without
permission checker returning true. This will lead to a bad VcUi to
the user, and this workaround can prevent that from happening.

BUG=b/290713998
Test="autoninja -C  out/Test chrome/test:browser_tests && out/Test/browser_tests --gtest_filter=VideoConferenceIntegrationTest.*"

Change-Id: Ia3182d889f36545b3ed0f1ef205b986a6cc27061
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4680874
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Charles Zhao <charleszhao@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1170267}
  • Loading branch information
Charles Zhao authored and Chromium LUCI CQ committed Jul 14, 2023
1 parent 267b846 commit de66e9f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ VideoConferenceMediaState VideoConferenceManagerAsh::GetAggregatedState() {
state.is_capturing_screen |= client_state.is_capturing_screen;
}

// Theoretically, capturing should imply permission, but we have seen bugs
// in permission checker that returns inconsisitent result with capturing,
// which leads to a bad ui to the user. This workaround is not ideal but will
// prevent showing the bad ui.
// TODO(b/291147970): consider removing this.
state.has_camera_permission |= state.is_capturing_camera;
state.has_microphone_permission |= state.is_capturing_microphone;

return state;
}

Expand Down

0 comments on commit de66e9f

Please sign in to comment.