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 <unknown commit>.

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
This commit is contained in:
olly 2022-03-24 10:15:13 +00:00 committed by Ian Baker
parent 76928738f3
commit ea2fbfd0a1

View file

@ -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);