Merge "Camera service: Speed up camera service startup on boot"
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 85faac6..86c48a4 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -276,7 +276,10 @@
     sp<ICameraServiceProxy> proxyBinder = nullptr;
 #ifndef __BRILLO__
     sp<IServiceManager> sm = defaultServiceManager();
-    sp<IBinder> binder = sm->getService(String16("media.camera.proxy"));
+    // Use checkService because cameraserver normally starts before the
+    // system server and the proxy service. So the long timeout that getService
+    // has before giving up is inappropriate.
+    sp<IBinder> binder = sm->checkService(String16("media.camera.proxy"));
     if (binder != nullptr) {
         proxyBinder = interface_cast<ICameraServiceProxy>(binder);
     }