Restore pause policy when restoring listener connection 03/240603/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.113627 accepted/tizen/6.0/unified/hotfix/20201103.002503 accepted/tizen/unified/20200812.143939 submit/tizen/20200811.011414 submit/tizen/20200811.105049 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 tizen_6.0.m2_release
authorBoram Bae <boram21.bae@samsung.com>
Mon, 10 Aug 2020 02:28:58 +0000 (11:28 +0900)
committerBoram Bae <boram21.bae@samsung.com>
Mon, 10 Aug 2020 02:28:58 +0000 (11:28 +0900)
Change-Id: Ic542d21e51bbd4f1ec73c96f4185ac68538958f1
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
src/client/sensor_listener.cpp

index 08e8cd7..51c0152 100644 (file)
@@ -203,6 +203,10 @@ void sensor_listener::restore(void)
        if (latency != m_attributes_int.end())
                set_max_batch_latency(m_attributes_int[SENSORD_ATTRIBUTE_MAX_BATCH_LATENCY]);
 
+       auto power = m_attributes_int.find(SENSORD_ATTRIBUTE_PAUSE_POLICY);
+       if (power != m_attributes_int.end())
+               set_attribute(SENSORD_ATTRIBUTE_PAUSE_POLICY, m_attributes_int[SENSORD_ATTRIBUTE_PAUSE_POLICY]);
+
        _D("Restored listener[%d]", get_id());
 }