Ensure processes are removed

pull/149/head
Jordan Janzen 3 years ago
parent a892409543
commit d33cb53e3e

@ -73,6 +73,9 @@ namespace hass_workstation_service.Domain.Sensors
[SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")]
private string IsMicrophoneInUseRegistry() private string IsMicrophoneInUseRegistry()
{ {
// Clear old values
this.processes.Clear();
using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone")) using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone"))
{ {
CheckLastUsed(key); CheckLastUsed(key);

@ -73,6 +73,9 @@ namespace hass_workstation_service.Domain.Sensors
[SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")]
private string IsWebCamInUseRegistry() private string IsWebCamInUseRegistry()
{ {
// Clear old values
this.processes.Clear();
using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam")) using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam"))
{ {
CheckLastUsed(key); CheckLastUsed(key);

Loading…
Cancel
Save