[Android] Brave news - fixes recyclerView issues
[Android] Brave news - attempt to make the widgets easier to access with news
[Android] Brave news - refactor recycler position in rel to image credit
lint format
Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/3237868
[GMNext] Make active and normal control colors dynamic
This CL converts default_control_color_active and
default_control_color_normal into macros to migrate them to dynamic
colors and updates their usages.
Bug: 1270919
Chromium change:
https://github.com/chromium/chromium/commit/1443d5c5c991380789b3681d017e06245b098e35
[AutoDark] Clean up WebContentsDarkModeController
Remove the shared preference for auto dark usage in Android, since force
dark settings is now provided in TabWebContentsDelegateAndroid.
For this reason, we can refactor the class by:
* Remove ApplicationStatusListener
* Remove NightModeStateProvider.Observer
Bug: 1249345
Chromium change:
https://github.com/chromium/chromium/commit/e74bbb61bf7cc3c23f690fc0a93f839c8ce38f35
The new UI adds a new option to let users opt-in to extended preloading.
Also migrate where preloading prefs are controlled from
PrivacyPreferencesManager (in privacy/settings) to
chrome/browser/prefetch, which is where the UI code is also now located
(along with most features using this setting, like the prefetch proxy,
no state prefetch, omnibox search prefetching).
The migrated pref enum names have been clarified to indicate that
wifi-only preloading is deprecated. This has been unsupported for a while now,
but it was not clear from most of the call sites. Obsolete comments have
also been removed.
Bug: 1263586
Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/3246335
feed-modularization: Clean up after FeedHooks migration
Simplify some things now that FeedHooks can be used
to create the ProcessScope.
I wanted to get rid of the initialization at startup
in FeedSurfaceTracker / FeedServiceBridge because timing
of the call can be error prone. The Feed component currently
needs a ProcessScope when it prefetches images, and this
shouldn't be tied to initialization of any UI. To do that,
I used Java reflection.
Bug: 1254437, 1274816
Fixes these errors:
../../brave/android/java/org/chromium/chrome/browser/brave_news/CardBuilderFeedCard.java:274: Error: Should pass resolved color instead of resource id here: getResources().getColor(R.color.brave_theme_color) [ResourceAsColor]
adLogo.setTextColor(R.color.brave_theme_color);
~~~~~~~~~~~~~~~~~~~~~~~~~
../../brave/android/java/org/chromium/chrome/browser/brave_news/CardBuilderFeedCard.java:279: Error: Should pass resolved color instead of resource id here: getResources().getColor(R.color.brave_theme_color) [ResourceAsColor]
gd.setStroke(1, R.color.brave_theme_color);
Chromium change:
https://github.com/chromium/chromium/commit/fee97f92a2beb2d82ccced2a90a8f5931b976c2f
[Start] Clean up unnecessary codes in StartSurfaceToolbar*.
1. LayoutStateProvider and LayoutStateObserver logic is removed in
StartSurfaceToolbar* because StartSurfaceState#onStateChanged should
already cover all layout state changes.
Lazy inflation in StartSurfaceToolbarCoordinator.java is moved to
onStartSurfaceStateChanged() accordingly.
Clean up StartSurfaceMediatorUnitTest.java accordingly.
2. hasIncognitoTabs() in StartSurfaceToolbarMediator.java is removed
because the previous CL has added an incognito tab model observer which
could observe whether there is incognito tab directly.
3. Stop passing isStartSurfaceEnabled into
TabSwitcherModeTTCoordinatorPhone.java because it's always false.
Change-Id: I024f77b4d7ece51ddd53fc1c0b2bc7cedcfa3c2f