Merge "sf: Add RGBA_4444 and RGBA_5551 format in getFormatStr function"
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
index c51fd53..73de186 100644
--- a/libs/gui/BufferQueueConsumer.cpp
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -92,7 +92,7 @@
         // be discarded based on them.
 #ifdef QCOM_BSP
         char property[PROPERTY_VALUE_MAX];
-        if (property_get("ro.sf.default_app_buffer", property, NULL) > 0) {
+        if (property_get("sf.default.app_buffer_count", property, NULL) > 0) {
            if (!mCore->mQueue[0].mIsAutoTimestamp && mCore->mDefaultMaxBufferCount < 3) {
               const BufferItem& bufferItem(mCore->mQueue[0]);
               nsecs_t desiredPresent = bufferItem.mTimestamp;
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 8f52fb1..2598d24 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -164,7 +164,7 @@
 
 #ifdef QCOM_BSP
     char property[PROPERTY_VALUE_MAX];
-    if (property_get("ro.sf.default_app_buffer", property, NULL) > 0) {
+    if (property_get("sf.default.app_buffer_count", property, NULL) > 0) {
         mSurfaceFlingerConsumer->setDefaultMaxBufferCount(atoi(property));
     }
 #endif
@@ -477,7 +477,7 @@
 
     // this gives us only the "orientation" component of the transform
     const State& s(getDrawingState());
-    if (!isOpaque(s) || s.alpha != 0xFF) {
+    if (!isOpaque(s)) {
         layer.setBlending(mPremultipliedAlpha ?
                 HWC_BLENDING_PREMULT :
                 HWC_BLENDING_COVERAGE);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 5e58899..eb09ea1 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -528,7 +528,7 @@
 
 status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
         Vector<DisplayInfo>* configs) {
-    if (configs == NULL) {
+    if ((configs == NULL) || (display.get() == NULL)) {
         return BAD_VALUE;
     }