diff --git a/include/ui/Gralloc1On0Adapter.h b/include/ui/Gralloc1On0Adapter.h
index edcfb65..97c9a89 100644
--- a/include/ui/Gralloc1On0Adapter.h
+++ b/include/ui/Gralloc1On0Adapter.h
@@ -22,6 +22,7 @@
 
 #include <hardware/gralloc1.h>
 
+#include <mutex>
 #include <string>
 #include <unordered_map>
 #include <vector>
@@ -468,8 +469,10 @@
     std::shared_ptr<Buffer> getBuffer(buffer_handle_t bufferHandle);
 
     static std::atomic<gralloc1_buffer_descriptor_t> sNextBufferDescriptorId;
+    std::mutex mDescriptorMutex;
     std::unordered_map<gralloc1_buffer_descriptor_t,
             std::shared_ptr<Descriptor>> mDescriptors;
+    std::mutex mBufferMutex;
     std::unordered_map<buffer_handle_t, std::shared_ptr<Buffer>> mBuffers;
 };
 
diff --git a/libs/ui/Gralloc1On0Adapter.cpp b/libs/ui/Gralloc1On0Adapter.cpp
index 6e69df1..d5b88de 100644
--- a/libs/ui/Gralloc1On0Adapter.cpp
+++ b/libs/ui/Gralloc1On0Adapter.cpp
@@ -193,6 +193,7 @@
         gralloc1_buffer_descriptor_t* outDescriptor)
 {
     auto descriptorId = sNextBufferDescriptorId++;
+    std::lock_guard<std::mutex> lock(mDescriptorMutex);
     mDescriptors.emplace(descriptorId,
             std::make_shared<Descriptor>(this, descriptorId));
 
@@ -207,6 +208,7 @@
 {
     ALOGV("Destroying descriptor %" PRIu64, descriptor);
 
+    std::lock_guard<std::mutex> lock(mDescriptorMutex);
     if (mDescriptors.count(descriptor) == 0) {
         return GRALLOC1_ERROR_BAD_DESCRIPTOR;
     }
@@ -255,6 +257,8 @@
     *outBufferHandle = handle;
     auto buffer = std::make_shared<Buffer>(handle, store, *descriptor, stride,
             true);
+
+    std::lock_guard<std::mutex> lock(mBufferMutex);
     mBuffers.emplace(handle, std::move(buffer));
 
     return GRALLOC1_ERROR_NONE;
@@ -309,6 +313,8 @@
             ALOGE("gralloc0 unregister failed: %d", result);
         }
     }
+
+    std::lock_guard<std::mutex> lock(mBufferMutex);
     mBuffers.erase(handle);
     return GRALLOC1_ERROR_NONE;
 }
@@ -320,6 +326,7 @@
             graphicBuffer->getNativeBuffer()->handle, graphicBuffer->getId());
 
     buffer_handle_t handle = graphicBuffer->getNativeBuffer()->handle;
+    std::lock_guard<std::mutex> lock(mBufferMutex);
     if (mBuffers.count(handle) != 0) {
         mBuffers[handle]->retain();
         return GRALLOC1_ERROR_NONE;
@@ -446,6 +453,7 @@
 std::shared_ptr<Gralloc1On0Adapter::Descriptor>
 Gralloc1On0Adapter::getDescriptor(gralloc1_buffer_descriptor_t descriptorId)
 {
+    std::lock_guard<std::mutex> lock(mDescriptorMutex);
     if (mDescriptors.count(descriptorId) == 0) {
         return nullptr;
     }
@@ -456,6 +464,7 @@
 std::shared_ptr<Gralloc1On0Adapter::Buffer> Gralloc1On0Adapter::getBuffer(
         buffer_handle_t bufferHandle)
 {
+    std::lock_guard<std::mutex> lock(mBufferMutex);
     if (mBuffers.count(bufferHandle) == 0) {
         return nullptr;
     }
diff --git a/services/sensorservice/SensorList.cpp b/services/sensorservice/SensorList.cpp
index f6d3d94..e0101c1 100644
--- a/services/sensorservice/SensorList.cpp
+++ b/services/sensorservice/SensorList.cpp
@@ -178,14 +178,7 @@
             if (s.hasAdditionalInfo()) {
                 result.appendFormat("has-additional-info, ");
             }
-            result.append("| ");
 
-            if (s.isDynamicSensor()) {
-                result.append("uuid: ");
-                for (uint8_t i : s.getUuid().b) {
-                    result.appendFormat("%02x", i);
-                }
-            }
             result.append("\n");
             return true;
         });
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index d654b17..2a8fa4a 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -45,8 +45,7 @@
 LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
 
-USE_HWC2 := false
-ifeq ($(USE_HWC2),true)
+ifeq ($(TARGET_USES_HWC2),true)
     LOCAL_CFLAGS += -DUSE_HWC2
     LOCAL_SRC_FILES += \
         SurfaceFlinger.cpp \
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index d732c07..6c78000 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -726,11 +726,6 @@
         // setup a solid color layer yet
         ALOGV("[%s] Requesting Client composition", mName.string());
         setCompositionType(hwcId, HWC2::Composition::Client);
-        error = hwcLayer->setBuffer(nullptr, Fence::NO_FENCE);
-        if (error != HWC2::Error::None) {
-            ALOGE("[%s] Failed to set null buffer: %s (%d)", mName.string(),
-                    to_string(error).c_str(), static_cast<int32_t>(error));
-        }
         return;
     }
 
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9f357df..fa61a9b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1005,7 +1005,12 @@
     }
 
     for (size_t displayId = 0; displayId < mDisplays.size(); ++displayId) {
-        status_t result = mDisplays[displayId]->prepareFrame(*mHwc);
+        auto& displayDevice = mDisplays[displayId];
+        if (!displayDevice->isDisplayOn()) {
+            continue;
+        }
+
+        status_t result = displayDevice->prepareFrame(*mHwc);
         ALOGE_IF(result != NO_ERROR, "prepareFrame for display %zd failed:"
                 " %d (%s)", displayId, result, strerror(-result));
     }
@@ -1229,7 +1234,12 @@
     }
 
     for (size_t displayId = 0; displayId < mDisplays.size(); ++displayId) {
-        status_t result = mDisplays[displayId]->prepareFrame(*mHwc);
+        auto& displayDevice = mDisplays[displayId];
+        if (!displayDevice->isDisplayOn()) {
+            continue;
+        }
+
+        status_t result = displayDevice->prepareFrame(*mHwc);
         ALOGE_IF(result != NO_ERROR, "prepareFrame for display %zd failed:"
                 " %d (%s)", displayId, result, strerror(-result));
     }
@@ -1267,6 +1277,9 @@
 
     for (size_t displayId = 0; displayId < mDisplays.size(); ++displayId) {
         auto& displayDevice = mDisplays[displayId];
+        if (!displayDevice->isDisplayOn()) {
+            continue;
+        }
         const auto hwcId = displayDevice->getHwcDisplayId();
         if (hwcId >= 0) {
             mHwc->commit(hwcId);
