From 3854ed549012f2abf8fea7b0e6db30b104ea5547 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 23 Mar 2012 14:17:18 -0700 Subject: [PATCH] surfaceflinger: disable ddms debugging on pdk builds DDMS debugging depends on non-pdk apis, disable it when a pdk build is selected. Change-Id: I6376b5c4cf49f2c51f35f8d567f7c6d18daf893f --- services/surfaceflinger/Android.mk | 7 +++++-- services/surfaceflinger/SurfaceFlinger.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index aa1e4268f..702b52bd0 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -7,7 +7,6 @@ LOCAL_SRC_FILES:= \ LayerBase.cpp \ LayerDim.cpp \ LayerScreenshot.cpp \ - DdmConnection.cpp \ DisplayHardware/DisplayHardware.cpp \ DisplayHardware/DisplayHardwareBase.cpp \ DisplayHardware/HWComposer.cpp \ @@ -49,7 +48,11 @@ LOCAL_SHARED_LIBRARIES := \ libgui # this is only needed for DDMS debugging -LOCAL_SHARED_LIBRARIES += libdvm libandroid_runtime +ifneq ($(TARGET_BUILD_PDK), true) + LOCAL_SHARED_LIBRARIES += libdvm libandroid_runtime + LOCAL_CLFAGS += -DDDMS_DEBUGGING + LOCAL_SRC_FILES += DdmConnection.cpp +endif LOCAL_MODULE:= libsurfaceflinger diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 03e272d9f..fe3958429 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -116,11 +116,13 @@ void SurfaceFlinger::init() property_get("debug.sf.showbackground", value, "0"); mDebugBackground = atoi(value); +#ifdef DDMS_DEBUGGING property_get("debug.sf.ddms", value, "0"); mDebugDDMS = atoi(value); if (mDebugDDMS) { DdmConnection::start(getServiceName()); } +#endif ALOGI_IF(mDebugRegion, "showupdates enabled"); ALOGI_IF(mDebugBackground, "showbackground enabled");