Skip to content

Commit b2eb0a4

Browse files
Roman KiryanovDatabean
authored andcommitted
modem_simulator: move the time update when the modem is turned on
`OnFirstClientConnected` is called too early and the time value is sitting (during booting) in the buffer which makes that value obsolete. Bug: 503430159 Change-Id: I41e6a45032babed16e24a138052a89b86171ef82 Signed-off-by: Roman Kiryanov <rkir@google.com>
1 parent ab19418 commit b2eb0a4

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

base/cvd/cuttlefish/host/commands/modem_simulator/modem_simulator.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ void ModemSimulator::DispatchCommand(const Client& client,
121121
}
122122

123123
void ModemSimulator::OnFirstClientConnected() {
124-
if (misc_service_) {
125-
misc_service_->TimeUpdate();
126-
}
127-
128124
if (network_service_) {
129125
network_service_->OnVoiceRegisterStateChanged();
130126
network_service_->OnDataRegisterStateChanged();

base/cvd/cuttlefish/host/commands/modem_simulator/network_service.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ void NetworkService::HandleRadioPower(const Client& client, std::string& command
321321
auto sim_status = sim_service_->GetSimStatus();
322322
OnSimStatusChanged(sim_status);
323323
}
324+
misc_service_->TimeUpdate();
324325
break;
325326
default:
326327
client.SendCommandResponse(kCmeErrorOperationNotSupported);

0 commit comments

Comments
 (0)