• Jason Lin's avatar
    CameraMicTrayItemView follows notifications instead of capture state · a3560d80
    Jason Lin authored
    VmCameraMicManager displays camera and mic notifications based on VMs'
    media capture state. And CameraMicTrayItemView is meant to follow
    VmCameraMicManager and displays camera and mic indicators on the
    systray.
    
    CL 2576232 changes the notifications behavior such that when a VM is
    accessing both camera and mic, only a camera icon notification is
    displayed. In this case, we don't want CameraMicTrayItemView to display
    the mic indicator unless a mic icon notification is also displayed.
    
    To fix this issue, this CL lets CameraMicTrayItemView follows the
    notification state (via VmCameraMicManager::IsNotificationActive())
    instead of the device state (via VmCameraMicManager::IsDeviceActive()).
    
    bug: b/167491603
    Change-Id: I514f7be204d74cc43ac67d12bc2ce7215bf50cb7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2581180
    Commit-Queue: Jason Lin <lxj@google.com>
    Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#835526}
    a3560d80
media_controller_impl.cc 12.4 KB