Adding @SuppressWarnings(NoSynchronizedMethodCheck).
In https://chromium-review.googlesource.com/c/chromium/src/+/750645 Chromium started to use an ErrorProne plugin to discourage synchronized public methods (an encourage the usage of synchronized blocks). In order to unblock the Chromium Roll we can suppress these warnings and decide if we want to align with Chromium on this check or ask them to make it optional. More details in the bug. TBR=magjed@webrtc.org Bug: webrtc:8491 Change-Id: Ie77a324e54aab44a4f59853959549f1d21f884a0 No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/20060 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20569}
This commit is contained in:
committed by
Commit Bot
parent
08a9c372df
commit
12251b6386
@ -77,6 +77,8 @@ public class ScreenCapturerAndroid
|
||||
}
|
||||
|
||||
@Override
|
||||
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
|
||||
@SuppressWarnings("NoSynchronizedMethodCheck")
|
||||
public synchronized void initialize(final SurfaceTextureHelper surfaceTextureHelper,
|
||||
final Context applicationContext, final VideoCapturer.CapturerObserver capturerObserver) {
|
||||
checkNotDisposed();
|
||||
@ -96,6 +98,8 @@ public class ScreenCapturerAndroid
|
||||
}
|
||||
|
||||
@Override
|
||||
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
|
||||
@SuppressWarnings("NoSynchronizedMethodCheck")
|
||||
public synchronized void startCapture(
|
||||
final int width, final int height, final int ignoredFramerate) {
|
||||
checkNotDisposed();
|
||||
@ -115,6 +119,8 @@ public class ScreenCapturerAndroid
|
||||
}
|
||||
|
||||
@Override
|
||||
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
|
||||
@SuppressWarnings("NoSynchronizedMethodCheck")
|
||||
public synchronized void stopCapture() {
|
||||
checkNotDisposed();
|
||||
ThreadUtils.invokeAtFrontUninterruptibly(surfaceTextureHelper.getHandler(), new Runnable() {
|
||||
@ -140,6 +146,8 @@ public class ScreenCapturerAndroid
|
||||
}
|
||||
|
||||
@Override
|
||||
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
|
||||
@SuppressWarnings("NoSynchronizedMethodCheck")
|
||||
public synchronized void dispose() {
|
||||
isDisposed = true;
|
||||
}
|
||||
@ -153,6 +161,8 @@ public class ScreenCapturerAndroid
|
||||
* @param ignoredFramerate ignored
|
||||
*/
|
||||
@Override
|
||||
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
|
||||
@SuppressWarnings("NoSynchronizedMethodCheck")
|
||||
public synchronized void changeCaptureFormat(
|
||||
final int width, final int height, final int ignoredFramerate) {
|
||||
checkNotDisposed();
|
||||
|
||||
Reference in New Issue
Block a user