Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 2887723002: Removes usage of native base::android::GetApplicationContext() (Closed)

Created:
3 years, 7 months ago by henrika_webrtc
Modified:
3 years, 6 months ago
Reviewers:
sakal
CC:
webrtc-reviews_webrtc.org
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Removes usage of native base::android::GetApplicationContext() BUG=webrtc:7665

Patch Set 1 #

Patch Set 2 : Added dependency to package org.chromium.base (does not build) #

Patch Set 3 : modules_unittests now builds and runs #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -50 lines) Patch
M webrtc/modules/audio_device/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 1 comment Download
M webrtc/modules/audio_device/android/audio_manager.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M webrtc/modules/audio_device/android/audio_record_jni.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M webrtc/modules/audio_device/android/audio_track_jni.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M webrtc/modules/audio_device/android/ensure_initialized.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java View 1 5 chunks +11 lines, -7 lines 1 comment Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java View 1 4 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java View 1 3 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/utility/include/jvm_android.h View 4 chunks +4 lines, -7 lines 0 comments Download
M webrtc/modules/utility/source/jvm_android.cc View 3 chunks +3 lines, -6 lines 0 comments Download
M webrtc/pc/test/androidtestinitializer.cc View 2 chunks +1 line, -3 lines 0 comments Download
M webrtc/sdk/android/src/jni/peerconnection_jni.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
henrika_webrtc
PTAL
3 years, 7 months ago (2017-05-17 09:21:46 UTC) #4
kjellander_webrtc
On 2017/05/17 09:21:46, henrika_webrtc wrote: > PTAL To make PS#2 to compile, I think you'll ...
3 years, 7 months ago (2017-05-17 11:30:24 UTC) #5
henrika_webrtc
Thanks Henrik, adding more feedback in the issue.
3 years, 7 months ago (2017-05-17 14:13:40 UTC) #6
sakal
3 years, 7 months ago (2017-05-18 07:12:54 UTC) #7
https://codereview.webrtc.org/2887723002/diff/40001/webrtc/modules/audio_devi...
File webrtc/modules/audio_device/BUILD.gn (right):

https://codereview.webrtc.org/2887723002/diff/40001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/BUILD.gn:362: "//base:base_java",
I don't want to add this dependency. Depending on Chromium Java code would
increase the binary size of WebRTC unnecessarily.

https://codereview.webrtc.org/2887723002/diff/40001/webrtc/modules/audio_devi...
File
webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
(right):

https://codereview.webrtc.org/2887723002/diff/40001/webrtc/modules/audio_devi...
webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java:163:
audioManager = (AudioManager)
ContextUtils.getApplicationContext().getSystemService(
Instead of using Chromium ContextUtils, I think we should cache the application
context in PeerConnectionFactory and add a
PeerConnectionFactory.getApplicationContext method.

Powered by Google App Engine
This is Rietveld 408576698