From e2e3474bae154382624bb5b7fd3d5f85061557cf Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 24 Mar 2022 10:15:13 +0000 Subject: [PATCH] Suppress new nullness warnings when stub for View.getLayoutParams is added. I am suppressing these warnings so that the stub file can be added and future usages will be checked correctly. As noted in https://developer.android.com/reference/android/view/View#getLayoutParams() this can be null before params are set. This was produced by running the TGP on . More information: go/new-nullness-stubs-lsc Tested: Automated deflaking failed to skip failures: http://mondo/deflaker/run/ff55923b-d76d-4eba-86dc-1b3077362352 http://test/OCL:435678706:BASE:436509228:1647985874385:4fae6f0a Some test failures are present, but the CL author has decided to mail the change anyway PiperOrigin-RevId: 436951684 --- .../exoplayer2/ui/StyledPlayerControlViewLayoutManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java index 57090630f7..f1e3de7798 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java @@ -598,6 +598,8 @@ import java.util.List; return width <= defaultModeMinimumWidth || height <= defaultModeMinimumHeight; } + // dereference of possibly-null reference timeBarParams + @SuppressWarnings("nullness:dereference.of.nullable") private void updateLayoutForSizeChange() { if (minimalControls != null) { minimalControls.setVisibility(isMinimalMode ? View.VISIBLE : View.INVISIBLE);