Android: Split ObservableSupplier into Nullable / Monotonic / NonNull variants

The goal is to use proper @Nullable annotations with
ObservableSuppliers.

To achieve this, we use interfaces that define nullness:
 * (Settable)NullableObservableSupplier
 * (Settable)ObservableSupplier <-- monotonic
 * (Settable)NonNullObservableSupplier

And we have ObservableSupplierImpl implement all of them.

In order to make this migration manageable, I've marked the interfaces
as @NullUnmarked, and will fix annotations in batches until they
can be marked @NullMarked.

This CL includes a batch in order to test out the new interfaces (and
because many were necessary to make the change).

Monotonic suppliers are by far the most common afaict, so that's why
the non-prefixed ObservableSupplier is the monotonic one (that, and
because "Monotonic" is a mouthful).

One implication of this approach is that we'll never have:
   ObservableSupplier<@Nullable Foo>
We'd have instead:
   NullableObservableSupplier<Foo>

Having the nullness in the interface rather than in the generic
allows for defining toNonNull() only on monotonic suppliers, and
simplifies the implementation.

Bug: 455874046
Change-Id: Id48e235b9ff16a5b21a9c1199863150d17c22736
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206746
Commit-Queue: Andrew Grieve <[email protected]>
Reviewed-by: Calder Kitagawa <[email protected]>
Owners-Override: Andrew Grieve <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1553094}
NOKEYCHECK=True
GitOrigin-RevId: 416a61c418c152a7a7ae568d89302e5ecb6e4a3d
1 file changed