blob: e9318f35423c350628d6ea02e9b2b4298f3f6f76 [file] [log] [blame] [edit]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/sensors/sensor_util.h"
#include "chromeos/components/sensors/ash/sensor_hal_dispatcher.h"
namespace chromeos {
namespace sensors {
bool BindSensorHalClient(mojo::PendingRemote<mojom::SensorHalClient> remote) {
auto* dispatcher = SensorHalDispatcher::GetInstance();
if (!dispatcher) {
// In some unit tests it's not initialized.
return false;
}
dispatcher->RegisterClient(std::move(remote));
return true;
}
} // namespace sensors
} // namespace chromeos