Commit 829dac44 authored by rijubrata.bhaumik's avatar rijubrata.bhaumik Committed by Commit bot

Fix data fetcher for light stop correctly on windows.

SetBufferAvailableState was from called DataFetcherSharedMemory::Stop for all
cases including TYPE_LIGHT, but for light, we are not using it as
we are using SetLightBuffer(light_buffer_, -1);

BUG=474586

Review URL: https://codereview.chromium.org/1064863002

Cr-Commit-Position: refs/heads/master@{#324044}
parent 733c2692
...@@ -341,12 +341,13 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) { ...@@ -341,12 +341,13 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) { bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
DisableSensors(consumer_type); DisableSensors(consumer_type);
SetBufferAvailableState(consumer_type, false);
switch (consumer_type) { switch (consumer_type) {
case CONSUMER_TYPE_ORIENTATION: case CONSUMER_TYPE_ORIENTATION:
SetBufferAvailableState(consumer_type, false);
orientation_buffer_ = nullptr; orientation_buffer_ = nullptr;
return true; return true;
case CONSUMER_TYPE_MOTION: case CONSUMER_TYPE_MOTION:
SetBufferAvailableState(consumer_type, false);
motion_buffer_ = nullptr; motion_buffer_ = nullptr;
return true; return true;
case CONSUMER_TYPE_LIGHT: case CONSUMER_TYPE_LIGHT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment