| Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
|
| diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
|
| index 65c52077c8e9bf054b9a643cba92aa2ed82159e6..ce23523c5fb22335f9e8ec6d9f44b64e41f2eb43 100644
|
| --- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
|
| +++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
|
| @@ -21,6 +21,8 @@ import java.lang.Thread;
|
| import java.nio.ByteBuffer;
|
| import org.webrtc.Logging;
|
|
|
| +import org.chromium.base.ContextUtils;
|
| +
|
| public class WebRtcAudioTrack {
|
| private static final boolean DEBUG = false;
|
|
|
| @@ -36,7 +38,6 @@ public class WebRtcAudioTrack {
|
| // Average number of callbacks per second.
|
| private static final int BUFFERS_PER_SECOND = 1000 / CALLBACK_BUFFER_SIZE_MS;
|
|
|
| - private final Context context;
|
| private final long nativeAudioTrack;
|
| private final AudioManager audioManager;
|
|
|
| @@ -165,11 +166,11 @@ public class WebRtcAudioTrack {
|
| }
|
| }
|
|
|
| - WebRtcAudioTrack(Context context, long nativeAudioTrack) {
|
| + WebRtcAudioTrack(long nativeAudioTrack) {
|
| Logging.d(TAG, "ctor" + WebRtcAudioUtils.getThreadInfo());
|
| - this.context = context;
|
| this.nativeAudioTrack = nativeAudioTrack;
|
| - audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
| + audioManager = (AudioManager) ContextUtils.getApplicationContext().getSystemService(
|
| + Context.AUDIO_SERVICE);
|
| if (DEBUG) {
|
| WebRtcAudioUtils.logDeviceInfo(TAG);
|
| }
|
|
|