Replace ANDROID with WEBRTC_ANDROID
Review URL: http://webrtc-codereview.appspot.com/91010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@283 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/voice_engine/main/source/voe_audio_processing_impl.cc b/src/voice_engine/main/source/voe_audio_processing_impl.cc
index 9094e0f..ab75e26 100644
--- a/src/voice_engine/main/source/voe_audio_processing_impl.cc
+++ b/src/voice_engine/main/source/voe_audio_processing_impl.cc
@@ -198,7 +198,7 @@
         return -1;
     }
 
-#if defined(MAC_IPHONE) || defined(ATA) || defined(ANDROID)
+#if defined(MAC_IPHONE) || defined(ATA) || defined(WEBRTC_ANDROID)
     if (mode == kAgcAdaptiveAnalog)
     {
         _engineStatistics.SetLastError(
diff --git a/src/voice_engine/main/source/voe_hardware_impl.cc b/src/voice_engine/main/source/voe_hardware_impl.cc
index ca37dbe..22be708 100644
--- a/src/voice_engine/main/source/voe_hardware_impl.cc
+++ b/src/voice_engine/main/source/voe_hardware_impl.cc
@@ -702,7 +702,7 @@
         _engineStatistics.SetLastError(VE_NOT_INITED, kTraceError);
         return -1;
     }
-#if defined(ANDROID)
+#if defined(WEBRTC_ANDROID)
     if (_audioDevicePtr->SetLoudspeakerStatus(enable) < 0)
     {
         _engineStatistics.SetLastError(VE_IGNORED_FUNCTION, kTraceError,
@@ -725,7 +725,7 @@
                  "GetLoudspeakerStatus()");
     IPHONE_NOT_SUPPORTED();
 
-#if defined(ANDROID)
+#if defined(WEBRTC_ANDROID)
     if (!_engineStatistics.Initialized())
     {
         _engineStatistics.SetLastError(VE_NOT_INITED, kTraceError);
diff --git a/src/voice_engine/main/source/voice_engine_impl.cc b/src/voice_engine/main/source/voice_engine_impl.cc
index 2914c50..137542b 100644
--- a/src/voice_engine/main/source/voice_engine_impl.cc
+++ b/src/voice_engine/main/source/voice_engine_impl.cc
@@ -10,7 +10,7 @@
 
 #include "voice_engine_impl.h"
 #include "trace.h"
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
 #include "audio_device.h" // SetAndroidObjects
 #endif
 
@@ -300,7 +300,7 @@
 
 int VoiceEngine::SetAndroidObjects(void* javaVM, void* env, void* context)
 {
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
     return AudioDeviceModule::SetAndroidObjects(javaVM, env, context);
 #else
     return -1;
diff --git a/src/voice_engine/main/test/auto_test/voe_extended_test.cc b/src/voice_engine/main/test/auto_test/voe_extended_test.cc
index a9b65be..0fa2eee 100644
--- a/src/voice_engine/main/test/auto_test/voe_extended_test.cc
+++ b/src/voice_engine/main/test/auto_test/voe_extended_test.cc
@@ -48,7 +48,7 @@
 extern const char* micFile;
 #endif
 
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
 // Global pointers
 extern void* globalJavaVM;
 extern void* globalContext;
@@ -433,7 +433,7 @@
     TEST_MUSTPASS(base->Init());
     MARK();
     TEST_MUSTPASS(base->Terminate());
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // verify AEC recording
     TEST_MUSTPASS(base->Init());
     MARK(); // verify output dat-files
@@ -3452,7 +3452,7 @@
     SLEEP(1000);
     // Switch codec
     CodecInst ci;
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     ci.channels = 1;
     ci.pacsize = 480;
     ci.plfreq = 16000;
@@ -4720,7 +4720,7 @@
     // Record mixed (speaker + microphone) signal to file
 
 
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     TEST(StartRecordingSpeakerStereo);
     ANL();
     TEST(StopRecordingSpeakerStereo);
@@ -4757,11 +4757,11 @@
     ANL();
 #else
     TEST_LOG("Skipping stereo record tests -"
-        " MAC_IPHONE or ANDROID is defined \n");
-#endif // #if !defined(MAC_IPHONE) && !defined(ANDROID)
+        " MAC_IPHONE or WEBRTC_ANDROID is defined \n");
+#endif // #if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     // Conversion between different file formats
 
-#if defined(MAC_IPHONE) || defined(ANDROID)
+#if defined(MAC_IPHONE) || defined(WEBRTC_ANDROID)
     TEST_MUSTPASS(base->StopPlayout(0));
     TEST_MUSTPASS(base->StopSend(0));
 #endif
@@ -4818,7 +4818,7 @@
         GetFilename("singleUserDemoConv_dummy.pcm"))); MARK();
     AOK(); ANL();
 
-#if defined(MAC_IPHONE) || defined(ANDROID)
+#if defined(MAC_IPHONE) || defined(WEBRTC_ANDROID)
     TEST_MUSTPASS(base->StartPlayout(0));
     TEST_MUSTPASS(base->StartSend(0));
 #endif
@@ -4966,7 +4966,7 @@
 
     TEST_MUSTPASS(base->Terminate());
     // end _WIN32
-#elif defined(WEBRTC_LINUX) && !defined(ANDROID)
+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
     wantedLayer = kAudioLinuxPulse;
     TEST_MUSTPASS(hardware->SetAudioDeviceLayer(wantedLayer));
     TEST_LOG("If you run on Linux with no/unsupported PA version, PulseAudio "
@@ -5006,7 +5006,7 @@
     }
 
     TEST_MUSTPASS(base->Terminate());
-#endif // defined(WEBRTC_LINUX) && !defined(ANDROID)
+#endif // defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
     // Invalid arguments
     wantedLayer = (AudioLayers) 17;
     TEST_MUSTPASS(-1 != hardware->SetAudioDeviceLayer(wantedLayer));
@@ -5052,7 +5052,7 @@
     }
     ANL();
 
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     // GetRecording/PlayoutDeviceStatus
     TEST(Getrecording/PlayoutDeviceStatus);
     ANL();
@@ -5154,7 +5154,7 @@
     MARK();
 #endif
     ANL();
-#endif // #if !defined(MAC_IPHONE) && !defined(ANDROID)
+#endif // #if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
 #if defined(MAC_IPHONE)
     TEST(ResetSoundDevice); ANL();
 
@@ -5232,7 +5232,7 @@
 {
     PrepareTest("Network");
 
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
     int sleepTime = 200;
     int sleepTime2 = 250;
 #elif defined(MAC_IPHONE) // MAC_IPHONE needs more delay for getSourceInfo()
@@ -5298,7 +5298,7 @@
     TEST_MUSTPASS(netw->GetLocalIP(localIP));
     MARK();
 
-#if !defined(WEBRTC_MAC) && !defined(ANDROID)
+#if !defined(WEBRTC_MAC) && !defined(WEBRTC_ANDROID)
     // default function calls (IPv6)
     TEST_MUSTPASS(netw->GetLocalIP(localIP, true));
     MARK();
@@ -5590,7 +5590,7 @@
     MARK();
 
     // STATE: external transport is disabled
-#if defined(ANDROID) || defined(MAC_IPHONE)
+#if defined(WEBRTC_ANDROID) || defined(MAC_IPHONE)
     int testError = VE_FUNC_NOT_SUPPORTED;
 #else
     int testError = VE_EXTERNAL_TRANSPORT_ENABLED;
@@ -6425,7 +6425,7 @@
     // END #if defined(_WIN32) || defined(WEBRTC_MAC) || defined(WEBRTC_LINUX)
 #else
     TEST_LOG( "Skipping ToS tests -  _WIN32, LINUX, MAC is not defined or "
-        "ANDROID is defined");
+        "WEBRTC_ANDROID is defined");
 #endif
 
     // >> end of SetSendTOS
@@ -6731,7 +6731,7 @@
 
     XRTPObserver rtpObserver;
 
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
     int sleepTime = 200;
 #else
     int sleepTime = 100;
@@ -7119,7 +7119,7 @@
     VoECodec* codec = _mgr.CodecPtr();
     TEST_MUSTPASS(NULL == codec);
     CodecInst cinst;
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     cinst.pltype = 104;
     strcpy(cinst.plname, "isac");
     cinst.plfreq = 32000;
@@ -7295,7 +7295,7 @@
     cinst.channels = 1;
     cinst.rate = 0;
     TEST_MUSTPASS(codec->SetRecPayloadType(0, cinst));
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     cinst.pltype = 104;
     strcpy(cinst.plname, "isac");
     cinst.plfreq = 32000;
@@ -7473,7 +7473,7 @@
 
     TEST_MUSTPASS(base->Init());
     TEST_MUSTPASS(base->CreateChannel());
-#if (defined _TEST_HARDWARE_ && (!defined(MAC_IPHONE) && !defined(ANDROID)))
+#if (defined _TEST_HARDWARE_ && (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)))
 #if defined(_WIN32)
     TEST_MUSTPASS(hardware->SetRecordingDevice(-1));
     TEST_MUSTPASS(hardware->SetPlayoutDevice(-1));
@@ -7503,12 +7503,12 @@
     ANL();
 #endif // #if !defined(MAC_IPHONE)
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     TEST(SetMicVolume); ANL();
     TEST_MUSTPASS(-1 != volume->SetMicVolume(256)); MARK();
     TEST_MUSTPASS(VE_INVALID_ARGUMENT != base->LastError());
     ANL();
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 
 #if !defined(MAC_IPHONE)
     TEST(SetChannelOutputVolumeScaling);
@@ -7521,7 +7521,7 @@
     TEST_MUSTPASS(VE_INVALID_ARGUMENT != base->LastError());
     ANL();
 #endif // #if !defined(MAC_IPHONE)
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     TEST(SetOutputVolumePan);
     ANL();
     TEST_MUSTPASS(-1 != volume->SetOutputVolumePan(-1, (float)-0.1,
@@ -7561,7 +7561,7 @@
     MARK();
     TEST_MUSTPASS(VE_INVALID_ARGUMENT != base->LastError());
     ANL();
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 #ifdef _TEST_FILE_
     TEST_MUSTPASS(file->StopPlayingFileAsMicrophone(0));
 #endif
@@ -7618,7 +7618,7 @@
     AecmModes AECMmode(kAecmSpeakerphone);
     bool enabledCNG(false);
 
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     const EcModes ECmodeDefault(kEcAecm);
 #else
     const EcModes ECmodeDefault(kEcAec);
@@ -7638,7 +7638,7 @@
     TEST_MUSTPASS(ECmode != ECmodeDefault);
     SLEEP(ECSleep);
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // set kEcAec mode
     TEST_MUSTPASS(apm->SetEcStatus(true, kEcAec));
     TEST_MUSTPASS(apm->GetEcStatus(enabled, ECmode));
@@ -7654,7 +7654,7 @@
     TEST_MUSTPASS(enabled != true);
     TEST_MUSTPASS(ECmode != kEcAec);
     SLEEP(ECSleep);
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // get default AECM mode, should the kAecmSpeakerphone as default
     TEST_MUSTPASS(apm->GetAecmMode(AECMmode, enabledCNG));
     TEST_MUSTPASS(AECMmode != kAecmSpeakerphone);
@@ -7746,7 +7746,7 @@
 
     AgcModes AGCmode(kAgcAdaptiveAnalog);
 
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     bool enabledDefault = false;
     AgcModes AGCmodeDefault(kAgcAdaptiveDigital);
 #else
@@ -7775,14 +7775,14 @@
     TEST_MUSTPASS(AGCmode != kAgcFixedDigital);
     SLEEP(AGCSleep);
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // set kAgcAdaptiveAnalog mode
     TEST_MUSTPASS(apm->SetAgcStatus(true, kAgcAdaptiveAnalog));
     TEST_MUSTPASS(apm->GetAgcStatus(enabled, AGCmode));
     TEST_LOG("AGC: enabled=%d, AGCmode=%d\n", enabled, AGCmode);
     TEST_MUSTPASS(AGCmode != kAgcAdaptiveAnalog);
     SLEEP(AGCSleep);
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // set kAgcAdaptiveDigital mode
     TEST_MUSTPASS(apm->SetAgcStatus(true, kAgcAdaptiveDigital));
     TEST_MUSTPASS(apm->GetAgcStatus(enabled, AGCmode));
@@ -7972,7 +7972,7 @@
     //////////////////////////////////
     // Speech, Noise and Echo Metrics
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // TODO(xians), enable the tests when APM is ready
     /*
     TEST(GetMetricsStatus);
@@ -8055,7 +8055,7 @@
     AOK();
     ANL();
     */
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // far-end AudioProcessing
     ///////
     // AGC
diff --git a/src/voice_engine/main/test/auto_test/voe_standard_test.cc b/src/voice_engine/main/test/auto_test/voe_standard_test.cc
index 3c6ee4e..318d39f 100644
--- a/src/voice_engine/main/test/auto_test/voe_standard_test.cc
+++ b/src/voice_engine/main/test/auto_test/voe_standard_test.cc
@@ -141,7 +141,7 @@
 char micFile[256] = {0}; // Filename copied to buffer in code
 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_MAC_INTEL)
 const char* micFile = "audio_long16bigendian.pcm";
-#elif defined(ANDROID)
+#elif defined(WEBRTC_ANDROID)
 const char* micFile = "/sdcard/audio_long16.pcm";
 #elif defined(_WIN32)
 // File path is relative to the location of 'voice_engine.gyp'.
@@ -959,7 +959,7 @@
    TEST_MUSTPASS( base->Init());
 #endif
 
-#if defined(ANDROID)
+#if defined(WEBRTC_ANDROID)
     TEST_LOG("Setting loudspeaker status to false \n");
     TEST_MUSTPASS(hardware->SetLoudspeakerStatus(false));
 #endif
@@ -1077,12 +1077,12 @@
 #else
     TEST_MUSTPASS(!hardware->GetCPULoad(loadPercent));
 #endif
-#if !defined(MAC_IPHONE) & !defined(ANDROID)
+#if !defined(MAC_IPHONE) & !defined(WEBRTC_ANDROID)
     TEST_MUSTPASS(hardware->GetSystemCPULoad(loadPercent));
     TEST_LOG("GetSystemCPULoad => %d%%\n", loadPercent);
 #endif
     
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     bool playAvail = false, recAvail = false;
     TEST_LOG("Get device status \n");
     TEST_MUSTPASS(hardware->GetPlayoutDeviceStatus(playAvail));
@@ -1091,7 +1091,7 @@
 #endif
     
     // Win, Mac and Linux sound device tests
-#if (defined(WEBRTC_MAC) && !defined(MAC_IPHONE)) || defined(_WIN32) || (defined(WEBRTC_LINUX) && !defined(ANDROID))
+#if (defined(WEBRTC_MAC) && !defined(MAC_IPHONE)) || defined(_WIN32) || (defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID))
     int idx, nRec = 0, nPlay = 0;
     char devName[128] = {0};
     char guidName[128] = {0};
@@ -1157,7 +1157,7 @@
     TEST_MUSTPASS(hardware->SetRecordingDevice(-1));
     TEST_MUSTPASS(hardware->SetPlayoutDevice(-1));
 #else
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     TEST_MUSTPASS(hardware->SetRecordingDevice(0));
     TEST_MUSTPASS(hardware->SetPlayoutDevice(0));
 #endif
@@ -1955,7 +1955,7 @@
     TEST_LOG("\n\n+++ More hardware tests +++\n\n");
 
 
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
 #ifdef _WIN32
     // should works also while already recording
     TEST_MUSTPASS(hardware->SetRecordingDevice(-1));
@@ -1982,7 +1982,7 @@
     TEST_MUSTPASS(!hardware->GetCPULoad(load));
 #endif
 
-#if !defined(WEBRTC_MAC) && !defined(ANDROID)
+#if !defined(WEBRTC_MAC) && !defined(WEBRTC_ANDROID)
     // Not supported on Mac yet
     load = -1;
     TEST_MUSTPASS(hardware->GetSystemCPULoad(load));
@@ -2223,7 +2223,7 @@
         SLEEP(1000);
     }
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // Mic volume test
 #if defined(_TEST_AUDIO_PROCESSING_) && defined(WEBRTC_VOICE_ENGINE_AGC)
     bool agcTemp(true);
@@ -2248,7 +2248,7 @@
     TEST_LOG("Reset AGC to previous state\n");
     TEST_MUSTPASS(apm->SetAgcStatus(agcTemp, agcModeTemp));
 #endif
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 
     // Input mute test
     TEST_LOG("Enabling input muting\n");
@@ -2265,7 +2265,7 @@
     TEST_MUSTPASS(mute);
     SLEEP(1000);
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // System output mute test
     TEST_LOG("Enabling system output muting\n");
     bool outputMute = true;
@@ -2299,9 +2299,9 @@
     TEST_MUSTPASS(volume->GetSystemInputMute(inputMute));
     TEST_MUSTPASS(inputMute);
     SLEEP(1000);
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 
-#if(!defined(MAC_IPHONE) && !defined(ANDROID))
+#if(!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     // Test Input & Output levels
     TEST_LOG("Testing input & output levels for 10 seconds (dT=1 second)\n");
     TEST_LOG("Speak in microphone to vary the levels...\n");
@@ -2324,7 +2324,7 @@
         TEST_LOG("    linear levels (0-32768): in=%5d, out=%5d\n",
                  inputLevelFullRange, outputLevelFullRange);
     }
-#endif // #if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 
     if (file)
     {
@@ -2351,7 +2351,7 @@
     TEST_MUSTPASS(1.0 != scaling);
 #endif // #if !defined(MAC_IPHONE)
 
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
     // Channel panning test
     TEST_LOG("Channel panning\n");
     float left = -1.0, right = -1.0;
@@ -2381,7 +2381,7 @@
     SLEEP(1000);
 #else
     TEST_LOG("Skipping stereo tests\n");
-#endif // #if !defined(MAC_IPHONE) && !defined(ANDROID))
+#endif // #if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
 
 #else
     TEST_LOG("\n\n+++ Volume tests NOT ENABLED +++\n");
@@ -2395,7 +2395,7 @@
 #ifdef WEBRTC_VOICE_ENGINE_AGC
     bool test;
     TEST_LOG("AGC calls\n");
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     TEST_LOG("Must be OFF by default\n");
     test = true;
     AgcModes agcMode = kAgcAdaptiveAnalog;
@@ -2417,10 +2417,10 @@
     TEST_MUSTPASS(apm->GetAgcStatus(test, agcMode));
     TEST_MUSTPASS(test);
     TEST_MUSTPASS(kAgcAdaptiveAnalog != agcMode);
-#endif // #if (defined(MAC_IPHONE) || defined(ANDROID))
+#endif // #if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
 
     TEST_LOG("Turn ON AGC\n");
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     TEST_MUSTPASS(apm->SetAgcStatus(true, kAgcAdaptiveDigital));
 #else
     TEST_MUSTPASS(apm->SetAgcStatus(true));
@@ -2428,13 +2428,13 @@
     TEST_LOG("Should be ON now\n");
     TEST_MUSTPASS(apm->GetAgcStatus(test, agcMode));
     TEST_MUSTPASS(!test);
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     TEST_MUSTPASS(kAgcAdaptiveDigital != agcMode);
 #else
     TEST_MUSTPASS(kAgcAdaptiveAnalog != agcMode);
 #endif
 
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     TEST_LOG("Testing Type settings\n");
     // Should fail
     TEST_MUSTPASS(!apm->SetAgcStatus(true, kAgcAdaptiveAnalog));
@@ -2460,7 +2460,7 @@
     TEST_MUSTPASS(apm->SetAgcStatus(true, kAgcAdaptiveAnalog));
     TEST_MUSTPASS(apm->GetAgcStatus(test, agcMode));
     TEST_MUSTPASS(kAgcAdaptiveAnalog != agcMode);
-#endif // #if (defined(MAC_IPHONE) || defined(ANDROID))
+#endif // #if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
 
     TEST_LOG("rxAGC calls\n");
     // Note the following test is not tested in iphone, android and wince,
@@ -2522,7 +2522,7 @@
 #ifdef WEBRTC_VOICE_ENGINE_ECHO
     TEST_LOG("EC calls\n");
     TEST_LOG("Must be OFF by default\n");
-#if (defined(MAC_IPHONE) || defined(ANDROID))
+#if (defined(MAC_IPHONE) || defined(WEBRTC_ANDROID))
     const EcModes ecModeDefault = kEcAecm;
 #else
     const EcModes ecModeDefault = kEcAec;
@@ -2551,7 +2551,7 @@
     TEST_MUSTPASS(!test);
     TEST_MUSTPASS(ecModeDefault != ecMode);
 
-#if (!defined(MAC_IPHONE) && !defined(ANDROID))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
     TEST_MUSTPASS(apm->SetEcStatus(true, kEcAec));
     TEST_MUSTPASS(apm->GetEcStatus(test, ecMode));
     TEST_MUSTPASS(kEcAec != ecMode);
@@ -2708,7 +2708,7 @@
 
     // TODO(xians), enable the metrics test when APM is ready
     /*
-#if (!defined(MAC_IPHONE) && !defined(ANDROID) && defined(WEBRTC_VOICE_ENGINE_NR))
+#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID) && defined(WEBRTC_VOICE_ENGINE_NR))
     TEST_LOG("Speech, Noise and Echo Metric calls\n");
     TEST_MUSTPASS(apm->GetMetricsStatus(enabled));   // check default
     TEST_MUSTPASS(enabled != false);
@@ -2741,7 +2741,7 @@
     }
     TEST_MUSTPASS(apm->SetMetricsStatus(false));     // disable metrics
 #else
-    TEST_LOG("Skipping apm metrics tests - MAC_IPHONE/ANDROID defined \n");
+    TEST_LOG("Skipping apm metrics tests - MAC_IPHONE/WEBRTC_ANDROID defined \n");
 #endif // #if (!defined(MAC_IPHONE) && !d...
 */
     // VAD/DTX indication
@@ -2758,7 +2758,7 @@
     {
         TEST_LOG ("RX VAD detections may vary depending on current signal"
             " and mic input \n");
-#if !defined(ANDROID) && !defined(MAC_IPHONE)
+#if !defined(WEBRTC_ANDROID) && !defined(MAC_IPHONE)
         RxCallback rxc;
         TEST_MUSTPASS(apm->RegisterRxVadObserver(0, rxc));
 #endif
@@ -2770,7 +2770,7 @@
         }
         SLEEP(500); // After sleeping we should have detected silence
         TEST_MUSTPASS(0 != apm->VoiceActivityIndicator(0));
-#if !defined(ANDROID) && !defined(MAC_IPHONE)
+#if !defined(WEBRTC_ANDROID) && !defined(MAC_IPHONE)
         TEST_MUSTPASS(0 != rxc._vadDecision);
 #endif
         if (file)
@@ -2790,7 +2790,7 @@
         SLEEP(500); // Sleep time selected by looking in mic play file, after
                     // sleep we should have detected voice
         TEST_MUSTPASS(1 != apm->VoiceActivityIndicator(0));
-#if !defined(ANDROID) && !defined(MAC_IPHONE)
+#if !defined(WEBRTC_ANDROID) && !defined(MAC_IPHONE)
         TEST_MUSTPASS(1 != rxc._vadDecision);
         TEST_LOG("Disabling RX VAD detection, make sure you see no "
             "detections\n");
@@ -3322,7 +3322,7 @@
         SLEEP(1000);
     }
 
-#if (defined (_WIN32) || (defined(WEBRTC_LINUX)) && !defined(ANDROID))
+#if (defined (_WIN32) || (defined(WEBRTC_LINUX)) && !defined(WEBRTC_ANDROID))
     valInt = -1;
     TEST_MUSTPASS(vsync->GetPlayoutBufferSize(valInt));
     TEST_LOG("Soundcard buffer size = %d ms\n", valInt);
@@ -3802,11 +3802,11 @@
     sprintf(str, "WebRTc VoiceEngine ");
 #if defined(_WIN32)
     strcat(str, "Win");
-#elif defined(WEBRTC_LINUX) && defined(WEBRTC_TARGET_PC) && !defined(ANDROID)
+#elif defined(WEBRTC_LINUX) && defined(WEBRTC_TARGET_PC) && !defined(WEBRTC_ANDROID)
     strcat(str, "Linux");
 #elif defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
     strcat(str, "Mac");
-#elif defined(ANDROID)
+#elif defined(WEBRTC_ANDROID)
     strcat(str, "Android");
 #elif defined(MAC_IPHONE)
     strcat(str, "iPhone");
diff --git a/src/voice_engine/main/test/auto_test/voe_standard_test.h b/src/voice_engine/main/test/auto_test/voe_standard_test.h
index 4c17bfa..0caade2 100644
--- a/src/voice_engine/main/test/auto_test/voe_standard_test.h
+++ b/src/voice_engine/main/test/auto_test/voe_standard_test.h
@@ -54,7 +54,7 @@
 }
 #endif
 
-#if defined(ANDROID)
+#if defined(WEBRTC_ANDROID)
 extern char mobileLogMsg[640];
 #endif
 
diff --git a/src/voice_engine/main/test/auto_test/voe_test_defines.h b/src/voice_engine/main/test/auto_test/voe_test_defines.h
index 896110f..1ed6396 100644
--- a/src/voice_engine/main/test/auto_test/voe_test_defines.h
+++ b/src/voice_engine/main/test/auto_test/voe_test_defines.h
@@ -14,7 +14,7 @@
 // Read WEBRTC_VOICE_ENGINE_XXX_API compiler flags
 #include "engine_configurations.h"
 
-#ifdef ANDROID
+#ifdef WEBRTC_ANDROID
  #include <android/log.h>
  #define ANDROID_LOG_TAG "VoiceEngine Auto Test"
  #define TEST_LOG(...) \