diff options
| author | Eric Jeong <ericjeong@google.com> | 2020-03-30 16:37:17 -0700 |
|---|---|---|
| committer | Eric Jeong <ericjeong@google.com> | 2020-03-30 16:41:13 -0700 |
| commit | 3e71957700e9f009615bd3e2691a3444ed0846b6 (patch) | |
| tree | df14eb61da8297f3484c5a3a6ebea3154d7b408a /watchdog/server | |
| parent | 73635195b23a414ff47a1b307508550d62325edf (diff) | |
| download | platform_packages_services_Car-3e71957700e9f009615bd3e2691a3444ed0846b6.tar.gz platform_packages_services_Car-3e71957700e9f009615bd3e2691a3444ed0846b6.tar.bz2 platform_packages_services_Car-3e71957700e9f009615bd3e2691a3444ed0846b6.zip | |
Reconcile car watchdog daemon to CarWatchdogService
- When there is a duplicated client registration, CarWatchdogService and
CarWatchdogManager don't generate errors.
- Car watchdog daemon will follow the same behavior.
Bug: 149875865
Test: From the same client, register the client two times and make sure
that registerClient doesn't return error.
Change-Id: I7a817647ad83eb999fc94dc7a7966f16144b9b51
Diffstat (limited to 'watchdog/server')
| -rw-r--r-- | watchdog/server/src/WatchdogProcessService.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/watchdog/server/src/WatchdogProcessService.cpp b/watchdog/server/src/WatchdogProcessService.cpp index 51d1f07bb..b4392cbb4 100644 --- a/watchdog/server/src/WatchdogProcessService.cpp +++ b/watchdog/server/src/WatchdogProcessService.cpp @@ -346,10 +346,8 @@ Status WatchdogProcessService::registerClientLocked(const sp<ICarWatchdogClient> TimeoutLength timeout, ClientType clientType) { const char* clientName = clientType == ClientType::Regular ? "client" : "mediator"; if (isRegisteredLocked(client)) { - std::string errorStr = StringPrintf("The %s is already registered.", clientName); - const char* errorCause = errorStr.c_str(); - ALOGW("Cannot register the %s. %s", clientName, errorCause); - return Status::fromExceptionCode(Status::EX_ILLEGAL_ARGUMENT, errorCause); + ALOGW("Cannot register the %s: the %s is already registered.", clientName, clientName); + return Status::ok(); } sp<IBinder> binder = BnCarWatchdog::asBinder(client); status_t status = binder->linkToDeath(this); |
