Project import generated by Copybara.
GitOrigin-RevId: b1e1aa216fe326387c3eb03fd49899e5871a95e6
diff --git a/browser/browser/src/main/java/androidx/browser/customtabs/CustomTabsIntent.java b/browser/browser/src/main/java/androidx/browser/customtabs/CustomTabsIntent.java
index 2e662e6..009f579 100644
--- a/browser/browser/src/main/java/androidx/browser/customtabs/CustomTabsIntent.java
+++ b/browser/browser/src/main/java/androidx/browser/customtabs/CustomTabsIntent.java
@@ -723,20 +723,21 @@
/**
* Sets {@link CustomTabColorSchemeParams} for the given color scheme.
*
- * This can be useful if {@link CustomTabsIntent#COLOR_SCHEME_SYSTEM} is set: Custom Tabs
+ * This allows specifying two different toolbar colors for light and dark schemes.
+ * It can be useful if {@link CustomTabsIntent#COLOR_SCHEME_SYSTEM} is set: Custom Tabs
* will follow the system settings and apply the corresponding
* {@link CustomTabColorSchemeParams} "on the fly" when the settings change.
*
- * For example, this allows specifying two different toolbar colors for light and dark
- * schemes, whereas {@link #setToolbarColor} will apply the given color to both schemes.
+ * The method {@link #setToolbarColor} will set the given color as a default color to both
+ * schemes.
*
- * If there is no {@link CustomTabColorSchemeParams} for the current scheme, or a
- * particular field of it is null, Custom Tabs will fall back to the defaults provided
- * via {@link #setToolbarColor} and similar methods. If, on the other hand, a non-null value
- * is present, it will override the default one.
+ * If there is no {@link CustomTabColorSchemeParams} for the current scheme, or a particular
+ * field of it is null, Custom Tabs will fall back to the defaults provided via
+ * {@link #setToolbarColor}. If, on the other hand, a non-null value is present, it will
+ * override the default color from {@link #setToolbarColor}.
*
* **Note**: to maintain compatibility with browsers not supporting this API, do provide the
- * defaults.
+ * defaults via {@link #setToolbarColor}.
*
* Example of setting two toolbar colors in backwards-compatible way:
* <pre><code>
diff --git a/browser/browser/src/main/java/androidx/browser/trusted/TrustedWebActivityIntentBuilder.java b/browser/browser/src/main/java/androidx/browser/trusted/TrustedWebActivityIntentBuilder.java
index 3f96417..6d14e55 100644
--- a/browser/browser/src/main/java/androidx/browser/trusted/TrustedWebActivityIntentBuilder.java
+++ b/browser/browser/src/main/java/androidx/browser/trusted/TrustedWebActivityIntentBuilder.java
@@ -142,7 +142,7 @@
/**
* Sets the color scheme, see {@link CustomTabsIntent.Builder#setColorScheme}.
- * In Trusted Web Activities color scheme may effect such UI elements as info bars and context
+ * In Trusted Web Activities color scheme may affect such UI elements as info bars and context
* menus.
*
* @param colorScheme Must be one of {@link CustomTabsIntent#COLOR_SCHEME_SYSTEM},
@@ -150,7 +150,8 @@
* {@link CustomTabsIntent#COLOR_SCHEME_DARK}.
*/
@NonNull
- public TrustedWebActivityIntentBuilder setColorScheme(int colorScheme) {
+ public TrustedWebActivityIntentBuilder setColorScheme(
+ @CustomTabsIntent.ColorScheme int colorScheme) {
mIntentBuilder.setColorScheme(colorScheme);
return this;
}
@@ -162,7 +163,8 @@
* settings. For more details see {@link CustomTabsIntent.Builder#setColorSchemeParams}.
*/
@NonNull
- public TrustedWebActivityIntentBuilder setColorSchemeParams(int colorScheme,
+ public TrustedWebActivityIntentBuilder setColorSchemeParams(
+ @CustomTabsIntent.ColorScheme int colorScheme,
@NonNull CustomTabColorSchemeParams params) {
mIntentBuilder.setColorSchemeParams(colorScheme, params);
return this;