From 3197d48407f16fc711d387db9c8855f505e0dfe1 Mon Sep 17 00:00:00 2001
From: "leozwang@webrtc.org"
 <leozwang@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>
Date: Fri, 2 Mar 2012 17:12:14 +0000
Subject: [PATCH] Enable audio device test on android Review URL:
 https://webrtc-codereview.appspot.com/428005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1829 4adac7df-926f-26a2-2b94-8c16560cd09d
---
 src/modules/audio_device/main/source/audio_device.gypi    | 8 ++++++++
 .../audio_device/main/test/audio_device_test_func.cc      | 4 ++--
 src/modules/audio_device/main/test/func_test_manager.cc   | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/modules/audio_device/main/source/audio_device.gypi b/src/modules/audio_device/main/source/audio_device.gypi
index 2f3f9b1df..73215ac38 100644
--- a/src/modules/audio_device/main/source/audio_device.gypi
+++ b/src/modules/audio_device/main/source/audio_device.gypi
@@ -109,6 +109,14 @@
             'android/audio_device_utility_android.h',
           ],
           'conditions': [
+            ['OS=="android"', {
+              'link_settings': {
+                'libraries': [
+                  '-llog',
+                  '-lOpenSLES',
+                ],
+              },
+            }],
             ['OS=="linux"', {
               'defines': [
                 'LINUX_ALSA',
diff --git a/src/modules/audio_device/main/test/audio_device_test_func.cc b/src/modules/audio_device/main/test/audio_device_test_func.cc
index 87a70aabc..811ba6ab8 100644
--- a/src/modules/audio_device/main/test/audio_device_test_func.cc
+++ b/src/modules/audio_device/main/test/audio_device_test_func.cc
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
  *
  *  Use of this source code is governed by a BSD-style license
  *  that can be found in the LICENSE file in the root of the source
@@ -25,7 +25,7 @@ int func_test(int);
 //  main()
 // ----------------------------------------------------------------------------
 
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE)
 int main(int /*argc*/, char* /*argv*/[])
 {
     func_test(0);
diff --git a/src/modules/audio_device/main/test/func_test_manager.cc b/src/modules/audio_device/main/test/func_test_manager.cc
index 8bc764683..61ff86066 100644
--- a/src/modules/audio_device/main/test/func_test_manager.cc
+++ b/src/modules/audio_device/main/test/func_test_manager.cc
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
  *
  *  Use of this source code is governed by a BSD-style license
  *  that can be found in the LICENSE file in the root of the source
@@ -45,7 +45,7 @@ struct AudioPacket
 };
 
 // Helper functions
-#if !defined(MAC_IPHONE) && !defined(ANDROID)
+#if !defined(MAC_IPHONE)
 char* GetFilename(char* filename)
 {
     return filename;