Address the API review comments.

This is a clean cherry-pick from:
https://android-review.git.corp.google.com/c/platform/frameworks/base/+/632313

Bug:73750871
Test: Unit Test
Change-Id: I8ebb617c819c7604957b3c086098ef5074d70f78
Merged-in: I8ebb617c819c7604957b3c086098ef5074d70f78
(cherry picked from commit 1abe9b187c641de77cfdcb93faa477a1112c2048)
6 files changed