mirror of
https://gitee.com/openharmony/sensors_sensor
synced 2024-12-04 12:53:20 +00:00
commit
bbf049a0ef
@ -61,10 +61,6 @@ void SensorService::OnStart()
|
||||
SEN_HILOGW("SensorService has already started");
|
||||
return;
|
||||
}
|
||||
if (clientDeathObserver_ == nullptr) {
|
||||
clientDeathObserver_ = new (std::nothrow) DeathRecipientTemplate(*const_cast<SensorService *>(this));
|
||||
CHKPV(clientDeathObserver_);
|
||||
}
|
||||
#ifdef HDF_DRIVERS_INTERFACE_SENSOR
|
||||
if (!InitInterface()) {
|
||||
SEN_HILOGE("Init interface error");
|
||||
@ -403,6 +399,10 @@ void SensorService::RegisterClientDeathRecipient(sptr<IRemoteObject> sensorClien
|
||||
{
|
||||
CALL_LOG_ENTER;
|
||||
CHKPV(sensorClient);
|
||||
if (clientDeathObserver_ == nullptr) {
|
||||
clientDeathObserver_ = new (std::nothrow) DeathRecipientTemplate(*const_cast<SensorService *>(this));
|
||||
CHKPV(clientDeathObserver_);
|
||||
}
|
||||
sensorClient->AddDeathRecipient(clientDeathObserver_);
|
||||
clientInfo_.SaveClientPid(sensorClient, pid);
|
||||
}
|
||||
|
0
services/src/sensor_service_stub.cpp
Executable file → Normal file
0
services/src/sensor_service_stub.cpp
Executable file → Normal file
Loading…
Reference in New Issue
Block a user