| 357 | } |
| 358 | |
| 359 | void GrPluginInterface::DispatchAppEvent(const std::shared_ptr<AppBaseEvent>& event) { |
| 360 | if (event->type_ == AppBaseEvent::EType::kConnectedClientCount) { |
| 361 | auto target_evt = std::dynamic_pointer_cast<MsgConnectedClientCount>(event); |
| 362 | //LOGI("connected clients count: {}", target_evt->connected_client_count_); |
| 363 | if (target_evt->connected_client_count_ <= 0) { |
| 364 | no_connected_clients_counter_++; |
| 365 | } |
| 366 | else { |
| 367 | no_connected_clients_counter_ = 0; |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | bool GrPluginInterface::DontHaveConnectedClientsNow() { |
| 373 | auto dont_have = no_connected_clients_counter_ > 10; |
nothing calls this directly
no outgoing calls
no test coverage detected