API tweaks round 2

Add nullability annotations and change a static constant to a method
that returns a value.

Fixes: 126702861
Fixes: 126699926
Fixes: 126698717
Fixes: 126699057
Fixes: 126701443
Fixes: 126700882
Test: compiles
Change-Id: I96396eb8890b8b5148cf74447e08c31983398e47
7 files changed