Correct annotations for WebViewUpdateService/Manager.

WebViewUpdateManager.getInstance() was only able to return null if
called on a device without FEATURE_WEBVIEW, which should not be
happening in the first place per the @RequiresFeature annotation. It
already WTFed if called from a system process rather than returning
null; make it throw UnsupportedOperationException for non-system
processes so that it can be @NonNull.

WebViewUpdateService.getValidWebViewPackages() should be documented as
requiring INTERACT_ACROSS_USERS permission. The underlying API has
always relied on this permission so there is no behavioral change here.

Remove the QUERY_ALL_PACKAGES permission from getValidWebViewPackages as
it's not enforced; the normal package visibility rules are applied to
the result. Note in the javadoc that callers should have
QUERY_ALL_PACKAGES to get a complete list.

Bug: 319292658
Test: n/a
Flag: android.webkit.update_service_ipc_wrapper
Change-Id: Id80775487dfed843671a82308e4b81f03eae346f
5 files changed