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

Commit db24255e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8561975 from 43eceebc to tm-release

Change-Id: I41150063f73871a90805071320ad0c4cc944cb4e
parents ac830ff8 43eceebc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -491,6 +491,7 @@ CameraDevice::disconnectLocked(sp<ACameraCaptureSession>& session) {
    }

    if (mRemote != nullptr) {
        ALOGD("%s: binder disconnect reached", __FUNCTION__);
        auto ret = mRemote->disconnect();
        if (!ret.isOk()) {
            ALOGE("%s: Transaction error while disconnecting device %s", __FUNCTION__,
+11 −0
Original line number Diff line number Diff line
@@ -1074,6 +1074,17 @@ void CCodec::configure(const sp<AMessage> &msg) {
                }
            } else {
                if ((config->mDomain & Config::IS_ENCODER) || !surface) {
                    if (vendorSdkVersion < __ANDROID_API_S__ &&
                            (format == COLOR_FormatYUV420Flexible ||
                             format == COLOR_FormatYUV420Planar ||
                             format == COLOR_FormatYUV420PackedPlanar ||
                             format == COLOR_FormatYUV420SemiPlanar ||
                             format == COLOR_FormatYUV420PackedSemiPlanar)) {
                        // pre-S framework used to map these color formats into YV12.
                        // Codecs from older vendor partition may be relying on
                        // this assumption.
                        format = HAL_PIXEL_FORMAT_YV12;
                    }
                    switch (format) {
                        case COLOR_FormatYUV420Flexible:
                            format = COLOR_FormatYUV420Planar;
+4 −1
Original line number Diff line number Diff line
@@ -243,20 +243,23 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice(
template <typename TClientBase>
binder::Status Camera2ClientBase<TClientBase>::disconnect() {
    ATRACE_CALL();
    ALOGD("Camera %s: start to disconnect", TClientBase::mCameraIdStr.string());
    Mutex::Autolock icl(mBinderSerializationLock);

    ALOGD("Camera %s: serializationLock acquired", TClientBase::mCameraIdStr.string());
    binder::Status res = binder::Status::ok();
    // Allow both client and the media server to disconnect at all times
    int callingPid = CameraThreadState::getCallingPid();
    if (callingPid != TClientBase::mClientPid &&
        callingPid != TClientBase::mServicePid) return res;

    ALOGV("Camera %s: Shutting down", TClientBase::mCameraIdStr.string());
    ALOGD("Camera %s: Shutting down", TClientBase::mCameraIdStr.string());

    // Before detaching the device, cache the info from current open session.
    // The disconnected check avoids duplication of info and also prevents
    // deadlock while acquiring service lock in cacheDump.
    if (!TClientBase::mDisconnected) {
        ALOGD("Camera %s: start to cacheDump", TClientBase::mCameraIdStr.string());
        Camera2ClientBase::getCameraService()->cacheDump();
    }