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

Commit b4bc04d0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "ACameraManager: remove get camera service loop" into main

parents 3816c808 959b7be4
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -84,14 +84,11 @@ sp<hardware::ICameraService> CameraManagerGlobal::getCameraServiceLocked() {

        sp<IServiceManager> sm = defaultServiceManager();
        sp<IBinder> binder;
        do {
            binder = sm->getService(toString16(kCameraServiceName));
            if (binder != nullptr) {
                break;
        binder = sm->checkService(String16(kCameraServiceName));
        if (binder == nullptr) {
            ALOGE("%s: Could not get CameraService instance.", __FUNCTION__);
            return nullptr;
        }
            ALOGW("CameraService not published, waiting...");
            usleep(kCameraServicePollDelay);
        } while(true);
        if (mDeathNotifier == nullptr) {
            mDeathNotifier = new DeathNotifier(this);
        }
+0 −1
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ class CameraManagerGlobal final : public RefBase {

  private:
    sp<hardware::ICameraService> mCameraService;
    const int                    kCameraServicePollDelay = 500000; // 0.5s
    const char*                  kCameraServiceName      = "media.camera";
    Mutex                        mLock;