Merge "Query legacy ConfigStore for use color management API." into qt-dev
diff --git a/services/bufferhub/Android.bp b/services/bufferhub/Android.bp
index a4b81fe..cd03bc2 100644
--- a/services/bufferhub/Android.bp
+++ b/services/bufferhub/Android.bp
@@ -63,6 +63,7 @@
"libbufferhubservice",
"libcrypto",
"libcutils",
+ "libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 482c723..6bfd302 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -87,11 +87,18 @@
LayerMetadata metadata, sp<IBinder>* handle,
sp<IGraphicBufferProducer>* gbp) {
if (mFlinger->authenticateSurfaceTexture(parent) == false) {
+ ALOGE("failed to authenticate surface texture");
+ // The extra parent layer check below before returning is to help with debugging
+ // b/134888387. Once the bug is fixed the check can be deleted.
+ if ((static_cast<MonitoredProducer*>(parent.get()))->getLayer() == nullptr) {
+ ALOGE("failed to find parent layer");
+ }
return BAD_VALUE;
}
const auto& layer = (static_cast<MonitoredProducer*>(parent.get()))->getLayer();
if (layer == nullptr) {
+ ALOGE("failed to find parent layer");
return BAD_VALUE;
}
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 53e67d4..2579225 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2133,7 +2133,14 @@
}
mTransactionCompletedThread.addPresentFence(mPreviousPresentFences[0]);
- mTransactionCompletedThread.sendCallbacks();
+
+ // Lock the mStateLock in case SurfaceFlinger is in the middle of applying a transaction.
+ // If we do not lock here, a callback could be sent without all of its SurfaceControls and
+ // metrics.
+ {
+ Mutex::Autolock _l(mStateLock);
+ mTransactionCompletedThread.sendCallbacks();
+ }
if (mLumaSampling && mRegionSamplingThread) {
mRegionSamplingThread->notifyNewContent();