summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2016-03-01 08:13:19 -0800
committerGlenn Kasten <gkasten@google.com>2016-03-01 08:16:05 -0800
commit10d8b6a5f9a7c24203e3ee228ec596d03c1aa78d (patch)
tree5f8273a377e718af9c9654730c7cd8b4810974b1
parent62496886cb4620c09bc5df0de70a883319616c25 (diff)
downloadandroid_frameworks_wilhelm-10d8b6a5f9a7c24203e3ee228ec596d03c1aa78d.tar.gz
android_frameworks_wilhelm-10d8b6a5f9a7c24203e3ee228ec596d03c1aa78d.tar.bz2
android_frameworks_wilhelm-10d8b6a5f9a7c24203e3ee228ec596d03c1aa78d.zip
Single definition of USE_DEBUG in Configuration.h
Bug: 27423077 Change-Id: I75cf9e7d6dd6134fe5b818951fd23353e16c7656
-rw-r--r--src/Android.mk4
-rw-r--r--src/Configuration.h27
-rw-r--r--src/android/CallbackProtector.h1
-rw-r--r--src/classes.h1
-rw-r--r--src/itfstruct.h1
-rw-r--r--src/locks.h2
-rw-r--r--src/sles_allinclusive.h1
7 files changed, 34 insertions, 3 deletions
diff --git a/src/Android.mk b/src/Android.mk
index ee34061..a40a8e5 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -45,9 +45,7 @@ LOCAL_CFLAGS += -DUSE_PROFILES=0
LOCAL_CFLAGS += -DUSE_TRACE
# or -UUSE_TRACE to disable API logging
-# enable mutex deadlock detection
-LOCAL_CFLAGS += -DUSE_DEBUG
-# or -UUSE_DEBUG for no mutex deadlock detection
+# see Configuration.h for USE_DEBUG
# enable assert() to do runtime checking
LOCAL_CFLAGS += -UNDEBUG
diff --git a/src/Configuration.h b/src/Configuration.h
new file mode 100644
index 0000000..73dd6e8
--- /dev/null
+++ b/src/Configuration.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Put build-time configuration options here rather than Android.mk,
+// so that all build modules will pick up the same options.
+
+#ifndef ANDROID_WILHELM_CONFIGURATION_H
+#define ANDROID_WILHELM_CONFIGURATION_H
+
+// uncomment to enable mutex deadlock detection,
+// or comment to disable mutex deadlock detection
+#define USE_DEBUG
+
+#endif // ANDROID_WILHELM_CONFIGURATION_H
diff --git a/src/android/CallbackProtector.h b/src/android/CallbackProtector.h
index 8b7d2cd..3b0cd19 100644
--- a/src/android/CallbackProtector.h
+++ b/src/android/CallbackProtector.h
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "Configuration.h"
#include "utils/threads.h"
//--------------------------------------------------------------------------------------------------
diff --git a/src/classes.h b/src/classes.h
index 1acfb1e..b6c5d90 100644
--- a/src/classes.h
+++ b/src/classes.h
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "Configuration.h"
#ifdef ANDROID
#include "android/CallbackProtector.h"
#include "android/android_Effect.h"
diff --git a/src/itfstruct.h b/src/itfstruct.h
index 825e894..815f21e 100644
--- a/src/itfstruct.h
+++ b/src/itfstruct.h
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "Configuration.h"
#ifdef ANDROID
#include "media/AudioEffect.h"
#include "hardware/audio_effect.h"
diff --git a/src/locks.h b/src/locks.h
index eed3dcc..0bb95bb 100644
--- a/src/locks.h
+++ b/src/locks.h
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "Configuration.h"
+
/** \file locks.h Mutual exclusion and condition variables */
#ifdef USE_DEBUG
diff --git a/src/sles_allinclusive.h b/src/sles_allinclusive.h
index 4b2e45e..ede6210 100644
--- a/src/sles_allinclusive.h
+++ b/src/sles_allinclusive.h
@@ -16,6 +16,7 @@
/** \file sles_allinclusive.h Everything including the kitchen sink */
+#include "Configuration.h"
#include <SLES/OpenSLES.h>
#include <OMXAL/OpenMAXAL.h>
#ifdef ANDROID