From ea2fbfd0a1c17985f2300a759065fc9c7d94b7f0 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 --- .../java/androidx/media3/ui/PlayerControlViewLayoutManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.java b/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.java index 2bee086110..2b89684eba 100644 --- a/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.java +++ b/libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.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);