Files
brave-core/android/java
samartnik 9f8078280d [Android] Added usage of ChromiumNetworkAdapter
This fixes these warnings:
../../brave/android/java/org/chromium/chrome/browser/rate/RateFeedbackUtils.java:76: warning: [UseNetworkAnnotations] Direct use of URL#openConnection() is forbidden in Chromium. Use ChromiumNetworkAdapter#openConnection() instead.

			urlConnection = (HttpURLConnection) url.openConnection();

			                                                     ^

    (see https://bugs.chromium.org/p/chromium/issues/detail?id=1231780)

../../brave/android/java/org/chromium/chrome/browser/shields/BraveShieldsUtils.java:124: warning: [UseNetworkAnnotations] Direct use of URL#openConnection() is forbidden in Chromium. Use ChromiumNetworkAdapter#openConnection() instead.

                urlConnection = (HttpURLConnection) url.openConnection();

                                                                      ^

    (see https://bugs.chromium.org/p/chromium/issues/detail?id=1231780)

In addition properly formatted RateFeedbackUtils.java file

Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/3321445

[Net][Android] Add and use ChromiumNetworkAdapter

This is a wrapper around URL#openConnection() that requires a
NetworkTrafficAnnotationTag, which is used for static analysis.
A future change will add compile-time checks to prevent direct usage
of URL#openConnection().

Replace all URL#openConnection() calls with
ChromiumNetworkAdapter#openConnection().

More blocklisted methods are likely to be added in the future.

Bug: 1231780
2022-02-17 14:02:44 -05:00
..
2022-02-17 14:02:36 -05:00