Bug 682921 - Use DEBUG_ANDROID_FOO instead of ANDROID_DEBUG_FOO; r=dougt

This allows people to use the --with-debug-label configure options
instead of editing source files.
This commit is contained in:
James Willcox 2011-08-29 14:29:39 -04:00
parent e713d1173c
commit effa559b42
4 changed files with 10 additions and 10 deletions

View File

@ -52,8 +52,8 @@
#include "nsColor.h"
// Some debug #defines
// #define ANDROID_DEBUG_EVENTS
// #define ANDROID_DEBUG_WIDGET
// #define DEBUG_ANDROID_EVENTS
// #define DEBUG_ANDROID_WIDGET
class nsWindow;

View File

@ -439,7 +439,7 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
break;
}
#ifndef ANDROID_DEBUG_EVENTS
#ifndef DEBUG_ANDROID_EVENTS
ALOG("AndroidGeckoEvent: %p : %d", (void*)jobj, mType);
#endif
}

View File

@ -60,7 +60,7 @@
#include "prlog.h"
#endif
#ifdef ANDROID_DEBUG_EVENTS
#ifdef DEBUG_ANDROID_EVENTS
#define EVLOG(args...) ALOG(args)
#else
#define EVLOG(args...) do { } while (0)
@ -217,7 +217,7 @@ nsAppShell::ProcessNextNativeEvent(PRBool mayWait)
curEvent = GetNextEvent();
if (!curEvent && mayWait) {
// hmm, should we really hardcode this 10s?
#if defined(ANDROID_DEBUG_EVENTS)
#if defined(DEBUG_ANDROID_EVENTS)
PRTime t0, t1;
EVLOG("nsAppShell: waiting on mQueueCond");
t0 = PR_Now();
@ -256,7 +256,7 @@ nsAppShell::ProcessNextNativeEvent(PRBool mayWait)
RemoveNextEvent();
delete nextEvent;
#if defined(ANDROID_DEBUG_EVENTS)
#if defined(DEBUG_ANDROID_EVENTS)
ALOG("# Removing DRAW event (%d outstanding)", mNumDraws);
#endif
@ -277,7 +277,7 @@ nsAppShell::ProcessNextNativeEvent(PRBool mayWait)
nextEvent->Action() == AndroidMotionEvent::ACTION_MOVE))
break;
#if defined(ANDROID_DEBUG_EVENTS)
#if defined(DEBUG_ANDROID_EVENTS)
ALOG("# Removing % 2d event", curType);
#endif

View File

@ -374,7 +374,7 @@ nsWindow::Show(PRBool aState)
nsAppShell::gAppShell->PostEvent(new AndroidGeckoEvent(-1, -1, -1, -1));
}
#ifdef ANDROID_DEBUG_WIDGET
#ifdef DEBUG_ANDROID_WIDGET
DumpWindows();
#endif
@ -1587,13 +1587,13 @@ nsWindow::OnKeyEvent(AndroidGeckoEvent *ae)
if (status == nsEventStatus_eConsumeNoDefault) {
pressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
}
#ifdef ANDROID_DEBUG_WIDGET
#ifdef DEBUG_ANDROID_WIDGET
__android_log_print(ANDROID_LOG_INFO, "Gecko", "Dispatching key pressEvent with keyCode %d charCode %d shift %d alt %d sym/ctrl %d metamask %d", pressEvent.keyCode, pressEvent.charCode, pressEvent.isShift, pressEvent.isAlt, pressEvent.isControl, ae->MetaState());
#endif
DispatchEvent(&pressEvent);
}
#ifdef ANDROID_DEBUG_IME
#ifdef DEBUG_ANDROID_IME
#define ALOGIME(args...) ALOG(args)
#else
#define ALOGIME(args...)