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

Commit 92c06fce authored by Christopher Wiley's avatar Christopher Wiley
Browse files

brillo: Don't even try contacting the camera proxy

This service isn't running, and every time we try, we spend
five seconds retrying to get a reference to a binder that
will never be registered with the service manager.

Bug: 26936651
Test: With this patch, 5 second pauses with logs disappear.

Change-Id: I9cc6b1b616f1b786c3bb4e687b1c742d31424684
parent 0039bcf0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -252,12 +252,14 @@ void CameraService::onFirstRef()
}

sp<ICameraServiceProxy> CameraService::getCameraServiceProxy() {
    sp<ICameraServiceProxy> proxyBinder = nullptr;
#ifndef __BRILLO__
    sp<IServiceManager> sm = defaultServiceManager();
    sp<IBinder> binder = sm->getService(String16("media.camera.proxy"));
    if (binder == nullptr) {
        return nullptr;
    if (binder != nullptr) {
        proxyBinder = interface_cast<ICameraServiceProxy>(binder);
    }
    sp<ICameraServiceProxy> proxyBinder = interface_cast<ICameraServiceProxy>(binder);
#endif
    return proxyBinder;
}