Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c5ffe46 authored by Steven Moreland's avatar Steven Moreland
Browse files

hidl getService throw correct exceptions.

NoSuchElementException needs to be thrown when getService is
called and the service is not available.

Test: hidl_test_java
Fixes: 63087967

Merged-In: I207098cfb732e888f91704f623e888e72e6ce7d9
Change-Id: I207098cfb732e888f91704f623e888e72e6ce7d9
parent 2ed8b061
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ static jobject JHwBinder_native_getService(
    if (transport != IServiceManager::Transport::HWBINDER && !vintfLegacy) {
        LOG(ERROR) << "service " << ifaceName << " declares transport method "
                   << toString(transport) << " but framework expects hwbinder.";
        signalExceptionForError(env, UNKNOWN_ERROR, true /* canThrowRemoteException */);
        signalExceptionForError(env, NAME_NOT_FOUND, true /* canThrowRemoteException */);
        return NULL;
    }