Some of the warnings are too common to fix/opt-out for non-Google projects. Also in the change, minor clean up of duplicated code. Test: presubmit Bug: 139945549 Change-Id: Ic176ef1f17133405851a79592b6bef5ccb403bd9