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

Commit 7bc4fc84 authored by Chien-Yu Chen's avatar Chien-Yu Chen
Browse files

camera2: fix an error reading a NULL string

Handle the case where the surface name isn't set.

Bug: 10461464
Change-Id: I3ee233a7a5f6489513e6d87241cda2aaefbfd43b
parent 990dad99
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ status_t CaptureRequest::readFromParcel(Parcel* parcel) {
        }

        // Surface.writeToParcel
        String16 name = parcel->readString16();
        ALOGV("%s: Read surface name = %s",
              __FUNCTION__, String8(name).string());
        const char16_t* name = parcel->readString16Inplace(&len);
        ALOGV("%s: Read surface name = %s", __FUNCTION__,
            name != NULL ? String8(name).string() : "<null>");
        sp<IBinder> binder(parcel->readStrongBinder());
        ALOGV("%s: Read surface binder = %p",
              __FUNCTION__, binder.get());