Fix HWC2to1Adapter crashing dragon at startup

Some devices such a dragon(ryu) do not start with a valid active
configuration id (e.g: -1). This is unexpected from HWC2to1Adapter
and resulted in crash at startup when switching the device from HWC1
to HWC2 with adapter.

This patch detects this at startup and put the device in an expected
configutation using the first configuration index (0).

Test: Tested on ryu
Change-Id: If2bb258d12636f1b2ebe8c7b167708dbf572fbe8
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 7135ed3..3800ce8 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -52,7 +52,11 @@
     LOCAL_SRC_FILES += \
         SurfaceFlinger.cpp \
         DisplayHardware/HWComposer.cpp
+    ifeq ($(TARGET_USES_HWC2ON1ADAPTER), true)
+        LOCAL_CFLAGS += -DBYPASS_IHWC
+    endif
 else
+    LOCAL_CFLAGS += -DBYPASS_IHWC
     LOCAL_SRC_FILES += \
         SurfaceFlinger_hwc1.cpp \
         DisplayHardware/HWComposer_hwc1.cpp