Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adda33c9 authored by Martijn Coenen's avatar Martijn Coenen Committed by Android (Google) Code Review
Browse files

Merge "SensorService: fix potential mutex use-before-init."

parents c5d36684 b41e87ae
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ using namespace android::hardware::sensors::V1_0;
namespace android {
namespace SensorDeviceUtils {

HidlServiceRegistrationWaiter::HidlServiceRegistrationWaiter()
        : mRegistered(ISensors::registerForNotifications("default", this)) {
HidlServiceRegistrationWaiter::HidlServiceRegistrationWaiter() {
    mRegistered = ISensors::registerForNotifications("default", this);
}

Return<void> HidlServiceRegistrationWaiter::onRegistration(
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public:
     */
    bool wait();
private:
    const bool mRegistered;
    bool mRegistered;

    std::mutex mLock;
    std::condition_variable mCondition;