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

Issue 1412673008: Introduces Android API level linting, fixes all current API lint errors. (Closed)

Created:
5 years, 1 month ago by phoglund
Modified:
5 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Introduces Android API level linting, fixes all current API lint errors. This CL attempts to annotate accesses on >16 API levels using as small scopes as possible. The TargetApi notations mean "yes, I know I'm accessing a higher API and I take responsibility for gating the call on Android API level". The Encoder/Decoder classes are annotated on the whole class, but they're only accessed through JNI; we should annotate on method level otherwise and preferably on private methods. This patch also fixes some compiler-level deprecation warnings (i.e. -Xlint:deprecation), but probably not all of them. BUG=webrtc:5063 R=henrika@webrtc.org, kjellander@webrtc.org, magjed@webrtc.org Committed: https://crrev.com/68876f990ea1ea365d2d8155df261b38ec9fbeff Cr-Commit-Position: refs/heads/master@{#10624}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 14

Patch Set 4 : Actually, the API level should be 15! #

Total comments: 2

Patch Set 5 : The API level shall be 16. Thou shalt not count to 15, nor shall thou count to 17. 14 is right out. #

Patch Set 6 : Completely rewritten solution based off Chrome infra, fix deprecation warnings for camera." #

Patch Set 7 : Add comments, rebase #

Total comments: 8

Patch Set 8 : Move AndroidManifest.xml and suppressions.xml to more general location. #

Total comments: 2

Patch Set 9 : Remove copyright header. #

Patch Set 10 : Correcting xml paths #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -75 lines) Patch
M talk/app/webrtc/java/android/org/webrtc/Camera2Enumerator.java View 2 chunks +3 lines, -0 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/CameraEnumerationAndroid.java View 1 2 3 4 5 6 chunks +20 lines, -19 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java View 1 2 3 4 5 3 chunks +6 lines, -7 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java View 1 2 3 4 5 16 chunks +32 lines, -30 lines 0 comments Download
M talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoEncoder.java View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M talk/libjingle.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
A webrtc/build/android/AndroidManifest.xml View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -0 lines 0 comments Download
A webrtc/build/android/suppressions.xml View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
M webrtc/examples/androidapp/AndroidManifest.xml View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java View 1 2 3 4 5 chunks +8 lines, -0 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java View 1 2 3 4 5 6 2 chunks +14 lines, -7 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java View 4 chunks +22 lines, -11 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (13 generated)
phoglund
magjed: VideoCapturerAndroid, note the potential bug I flagged there! henrika: voiceengine java code, note the ...
5 years, 1 month ago (2015-11-06 14:09:28 UTC) #2
phoglund
https://codereview.webrtc.org/1412673008/diff/40001/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java File talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java (right): https://codereview.webrtc.org/1412673008/diff/40001/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java#newcode475 talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java:475: // TODO(phoglund): this method is broken on API level ...
5 years, 1 month ago (2015-11-06 14:37:52 UTC) #3
henrika_webrtc
IMHO, supporting 15 will not work for audio since audio effects are only supported for ...
5 years, 1 month ago (2015-11-06 14:47:33 UTC) #5
henrika_webrtc
Almost forgot; many thanks for fixing ;-)
5 years, 1 month ago (2015-11-06 14:54:07 UTC) #6
phoglund
https://codereview.webrtc.org/1412673008/diff/40001/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java File webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java (right): https://codereview.webrtc.org/1412673008/diff/40001/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java#newcode286 webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java:286: // TODO(phoglund): I think this will break if called ...
5 years, 1 month ago (2015-11-06 15:00:44 UTC) #7
henrika_webrtc
https://codereview.webrtc.org/1412673008/diff/40001/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java File webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java (right): https://codereview.webrtc.org/1412673008/diff/40001/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java#newcode296 webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java:296: enableAcousticEchoCanceler(audioSession); My point is that nothing in this class ...
5 years, 1 month ago (2015-11-06 15:17:25 UTC) #8
perkj_webrtc
Cool! A quick drive by, https://codereview.webrtc.org/1412673008/diff/60001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1412673008/diff/60001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode54 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:54: @TargetApi(19) This should be ...
5 years, 1 month ago (2015-11-10 09:57:31 UTC) #10
phoglund
On 2015/11/10 09:57:31, perkj1 wrote: > Cool! A quick drive by, > > https://codereview.webrtc.org/1412673008/diff/60001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java > ...
5 years, 1 month ago (2015-11-10 11:14:29 UTC) #13
phoglund
PTAL
5 years, 1 month ago (2015-11-10 11:16:54 UTC) #14
henrika_webrtc
LGTM modules/audio_device
5 years, 1 month ago (2015-11-10 11:20:11 UTC) #15
kjellander_webrtc
I'm sorry for not reviewing this earlier. I think it's better to run the lint ...
5 years, 1 month ago (2015-11-10 12:32:51 UTC) #17
magjed_webrtc
lgtm talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java
5 years, 1 month ago (2015-11-10 13:24:04 UTC) #18
phoglund
OK kjellander, PTAL
5 years, 1 month ago (2015-11-12 12:31:55 UTC) #19
kjellander_webrtc
Nice work here! Looks good but I'd like to move the suppressions.xml file to a ...
5 years, 1 month ago (2015-11-12 13:02:18 UTC) #21
phoglund
PTAL https://codereview.webrtc.org/1412673008/diff/120001/talk/app/webrtc/java/lint/AndroidManifest.xml File talk/app/webrtc/java/lint/AndroidManifest.xml (right): https://codereview.webrtc.org/1412673008/diff/120001/talk/app/webrtc/java/lint/AndroidManifest.xml#newcode3 talk/app/webrtc/java/lint/AndroidManifest.xml:3: Copyright (c) 2012 The Chromium Authors. All rights ...
5 years, 1 month ago (2015-11-12 13:21:35 UTC) #22
kjellander_webrtc
lgtm assuming you'll remove the Chromium copyright header. https://codereview.webrtc.org/1412673008/diff/140001/webrtc/build/android/AndroidManifest.xml File webrtc/build/android/AndroidManifest.xml (right): https://codereview.webrtc.org/1412673008/diff/140001/webrtc/build/android/AndroidManifest.xml#newcode3 webrtc/build/android/AndroidManifest.xml:3: Copyright ...
5 years, 1 month ago (2015-11-12 13:49:33 UTC) #23
phoglund
https://codereview.webrtc.org/1412673008/diff/140001/webrtc/build/android/AndroidManifest.xml File webrtc/build/android/AndroidManifest.xml (right): https://codereview.webrtc.org/1412673008/diff/140001/webrtc/build/android/AndroidManifest.xml#newcode3 webrtc/build/android/AndroidManifest.xml:3: Copyright (c) 2012 The Chromium Authors. All rights reserved. ...
5 years, 1 month ago (2015-11-12 13:51:29 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412673008/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412673008/160001
5 years, 1 month ago (2015-11-12 13:51:43 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_clang_dbg/builds/8847)
5 years, 1 month ago (2015-11-12 14:04:39 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412673008/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412673008/180001
5 years, 1 month ago (2015-11-12 14:09:37 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
5 years, 1 month ago (2015-11-12 16:09:56 UTC) #34
phoglund
Committed patchset #10 (id:180001) manually as 68876f990ea1ea365d2d8155df261b38ec9fbeff (presubmit successful).
5 years, 1 month ago (2015-11-12 16:37:07 UTC) #35
commit-bot: I haz the power
5 years, 1 month ago (2015-11-12 16:37:11 UTC) #36
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/68876f990ea1ea365d2d8155df261b38ec9fbeff
Cr-Commit-Position: refs/heads/master@{#10624}

Powered by Google App Engine
This is Rietveld 408576698