diff options
Diffstat (limited to 'camera/camera2/OutputConfiguration.cpp')
-rw-r--r-- | camera/camera2/OutputConfiguration.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/camera/camera2/OutputConfiguration.cpp b/camera/camera2/OutputConfiguration.cpp index 813d6c9bb9..feb04c24ed 100644 --- a/camera/camera2/OutputConfiguration.cpp +++ b/camera/camera2/OutputConfiguration.cpp @@ -1,6 +1,6 @@ /* ** -** Copyright 2015, The Android Open Source Project +** Copyright 2015-2018, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. @@ -64,6 +64,10 @@ bool OutputConfiguration::isShared() const { return mIsShared; } +String16 OutputConfiguration::getPhysicalCameraId() const { + return mPhysicalCameraId; +} + OutputConfiguration::OutputConfiguration() : mRotation(INVALID_ROTATION), mSurfaceSetID(INVALID_SET_ID), @@ -139,6 +143,8 @@ status_t OutputConfiguration::readFromParcel(const android::Parcel* parcel) { return err; } + parcel->readString16(&mPhysicalCameraId); + mRotation = rotation; mSurfaceSetID = setID; mSurfaceType = surfaceType; @@ -153,8 +159,9 @@ status_t OutputConfiguration::readFromParcel(const android::Parcel* parcel) { mGbps.push_back(surface.graphicBufferProducer); } - ALOGV("%s: OutputConfiguration: rotation = %d, setId = %d, surfaceType = %d", - __FUNCTION__, mRotation, mSurfaceSetID, mSurfaceType); + ALOGV("%s: OutputConfiguration: rotation = %d, setId = %d, surfaceType = %d," + " physicalCameraId = %s", __FUNCTION__, mRotation, mSurfaceSetID, + mSurfaceType, String8(mPhysicalCameraId).string()); return err; } @@ -204,6 +211,9 @@ status_t OutputConfiguration::writeToParcel(android::Parcel* parcel) const { err = parcel->writeParcelableVector(surfaceShims); if (err != OK) return err; + err = parcel->writeString16(mPhysicalCameraId); + if (err != OK) return err; + return OK; } |