[cr144][Android] Adjusted pin tab icon color on NTP

Forced the color of pin icon at most visited strip to white color.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4aa1ff3579960b0946ab8707528e9b3299a929bd

	[MVT Customization][Launch] Enable MostVisitedTilesCustomization (ToT by default).

	This CL enables MVT Customization by default on Android:
	* kMostVisitedTilesCustomization: Disabled -> Enabled.

	This corresponds to the flag #most-visited-tiles-customization, which
	was added in crrev.com/c/6199259 .

	We will apply Finch 100% everywhere after this CL lands.

	Bug: 388782412
	Change-Id: Ib04f110b0fa7e6366264cbb071815c69033d1fc7
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7169644
This commit is contained in:
AlexeyBarabash
2025-12-21 17:13:19 -05:00
committed by Emerick Rogul
parent 471cc343d5
commit e1e081c80f
@@ -6,9 +6,13 @@
package org.chromium.chrome.browser.suggestions.tile;
import android.content.Context;
import android.content.res.ColorStateList;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.core.widget.ImageViewCompat;
import org.chromium.base.Log;
import org.chromium.build.annotations.NullMarked;
import org.chromium.chrome.R;
@@ -44,6 +48,14 @@ public class BraveTileView extends TileView {
titleView.getPaddingTop(),
titleView.getPaddingRight(),
bottomPadding);
// Get the text color from the TextView after TextAppearance is applied
// and use it for the icon tint to match the text color
ImageView pinnedShortcutBadgeView = findViewById(R.id.pinned_shortcut_badge);
if (pinnedShortcutBadgeView != null) {
ColorStateList textColors = titleView.getTextColors();
ImageViewCompat.setImageTintList(pinnedShortcutBadgeView, textColors);
}
}
} else {
Log.w(TAG, "Attempt to access profile before native initialization");