Merge "Add multi-client support in camera2" into main
diff --git a/drm/libmediadrm/DrmHalHidl.cpp b/drm/libmediadrm/DrmHalHidl.cpp
index c8c6e8e..33ea5ea 100644
--- a/drm/libmediadrm/DrmHalHidl.cpp
+++ b/drm/libmediadrm/DrmHalHidl.cpp
@@ -339,7 +339,7 @@
DrmUtils::LOG2BI("makeDrmFactories: using default passthrough drm instance");
factories.push_back(passthrough);
} else {
- DrmUtils::LOG2BE("Failed to find passthrough drm factories");
+ DrmUtils::LOG2BW("Failed to find passthrough drm factories");
}
}
return factories;
diff --git a/media/codec2/vndk/platform/C2BqBuffer.cpp b/media/codec2/vndk/platform/C2BqBuffer.cpp
index 665f9fc..17dfe9c 100644
--- a/media/codec2/vndk/platform/C2BqBuffer.cpp
+++ b/media/codec2/vndk/platform/C2BqBuffer.cpp
@@ -997,7 +997,7 @@
return -1;
}
- if (toUsage != graphicBuffer->getUsage()) {
+ if ((toUsage & graphicBuffer->getUsage()) != toUsage) {
sp<GraphicBuffer> newBuffer = new GraphicBuffer(
graphicBuffer->handle, GraphicBuffer::CLONE_HANDLE,
graphicBuffer->width, graphicBuffer->height, graphicBuffer->format,
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 867561a..5fbe48c 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1327,7 +1327,8 @@
// states to reset position info for pcm tracks
if (audio_is_linear_pcm(mFormat)
- && (state == IDLE || state == STOPPED || state == FLUSHED)) {
+ && (state == IDLE || state == STOPPED || state == FLUSHED
+ || state == PAUSED)) {
mFrameMap.reset();
if (!isFastTrack()) {
diff --git a/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp b/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp
index 6a823fd..88998c6 100644
--- a/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp
+++ b/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp
@@ -203,7 +203,7 @@
void AidlProviderInfo::binderDied(void *cookie) {
AidlProviderInfo *provider = reinterpret_cast<AidlProviderInfo *>(cookie);
ALOGI("Camera provider '%s' has died; removing it", provider->mProviderInstance.c_str());
- provider->mManager->removeProvider(provider->mProviderInstance);
+ provider->mManager->removeProvider(std::string(provider->mProviderInstance));
}
status_t AidlProviderInfo::setUpVendorTags() {
@@ -321,7 +321,7 @@
if (link != STATUS_OK) {
ALOGW("%s: Unable to link to provider '%s' death notifications",
__FUNCTION__, mProviderName.c_str());
- mManager->removeProvider(mProviderInstance);
+ mManager->removeProvider(std::string(mProviderInstance));
return nullptr;
}
diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
index 756c255..27ae766 100644
--- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
+++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
@@ -391,7 +391,7 @@
__FUNCTION__,
mProviderName.c_str(),
linked.description().c_str());
- mManager->removeProvider(mProviderInstance);
+ mManager->removeProvider(std::string(mProviderInstance));
return nullptr;
} else if (!linked) {
ALOGW("%s: Unable to link to provider '%s' death notifications",
@@ -451,7 +451,7 @@
ALOGW("%s: Unexpected serviceDied cookie %" PRIu64 ", expected %" PRIu32,
__FUNCTION__, cookie, mId);
}
- mManager->removeProvider(mProviderInstance);
+ mManager->removeProvider(std::string(mProviderInstance));
}
std::unique_ptr<CameraProviderManager::ProviderInfo::DeviceInfo>