Import updated Android SetupCompat Library 682227189
Copied from google3/third_party/java_src/android_libs/setupcompat
Test: mm
Included changes:
- 682227189 [BC25] Fix NPE when device in the 2 pane mode.
- 681811849 [BC25] Refine down button position in landscape mode. (2/2)
- 681778893 [BC25] Make the button bar with can be in the whole scree...
- 681309180 [BC25][Down Button] Fix the issue that the button width i...
- 680892642 [BC25] Using footer bar width to calcuate the button widt...
- 680884916 Create the keyboard focus change flag.
- 680797017 Automated g4 rollback of changelist 671307433.
- 680440592 [BC25] Add sucFooterBarButtonFontWeight attribute and set...
- 679015292 [BC25] remove using the attribute sucFullDynamicColor as ...
- 678654714 Create item group corner Radius Partner Config.
- 678474263 [BC25] Apply the button width to expressive style if scro...
- 676755151 [SUW] When GlifExpressive flag to PartnerConfigHelper wil...
- 675803166 [BC25] Add margin to footer button in expressive style
- 674997096 [BC25] Add sucFooterBarMinHeight attribute to adjust the ...
- 674083566 [BC25] Add MaterialButton support for FooterBarMixin
- 673750749 [BC25] Add footer button text color for Glif expressive s...
- 672458843 [BC25] Set button width for expressive style
- 672361102 [BC25] Update primary button color for Glif expressive st...
- 671581134 [BC25] Add setVisibility() method to FooterButton.Builder
- 671307433 Automated g4 rollback of changelist 671261504.
- 671261504 Remove the deprecated component CompatEnforcer, due to th...
- 671255468 [BC25] Add IFooterActionButton interface and used in Foot...
- 671156324 [BC25] Add MaterialFooterActionButton
- 668397555 [BC25] Add IFooterActionButton interface to indicate Andr...
- 667870529 [BC25] Guard addSpace when GlifExpressive flag enabled.
- 666114642 [Theme] Add Glif Expressive theme in ThemeHelper and Them...
- 663516526 [BC25] Implement isGlifExpressiveEnabled method in SetupC...
- 661990826 Fix typo in PartnerConfigHelper.isGlifExpressiveEnabled()...
- 660701130 [BC25][Theme] Add isGlifExpressEnabled method to PartnerC...
- 657141370 Create SetupWizardOrchestratorViewModel.
- 656277701 Small fix for passing logging observer from PartnerCustom...
PiperOrigin-RevId: 682227189
Bug: 344740755
Change-Id: I8749422c83edc23a6e725d9806314b20e45fd309
diff --git a/main/java/com/google/android/setupcompat/PartnerCustomizationLayout.java b/main/java/com/google/android/setupcompat/PartnerCustomizationLayout.java
index 26e7042..fff4c08 100644
--- a/main/java/com/google/android/setupcompat/PartnerCustomizationLayout.java
+++ b/main/java/com/google/android/setupcompat/PartnerCustomizationLayout.java
@@ -309,6 +309,10 @@
* {@code false}.
*/
public boolean shouldApplyDynamicColor() {
+ if (!PartnerConfigHelper.isSetupWizardDynamicColorEnabled(getContext())) {
+ return false;
+ }
+
if (!useDynamicColor) {
return false;
}
@@ -323,23 +327,23 @@
/**
* Returns {@code true} if the current layout/activity applies full dynamic color. Otherwise,
- * returns {@code false}. This method combines the result of {@link #shouldApplyDynamicColor()}
- * and the value of the {@code app:sucFullDynamicColor}.
+ * returns {@code false}. This method combines the result of {@link #shouldApplyDynamicColor()},
+ * the value of the {@code app:sucFullDynamicColor}, and the result of {@link
+ * PartnerConfigHelper#isSetupWizardFullDynamicColorEnabled(Context)}.
*/
public boolean useFullDynamicColor() {
- return shouldApplyDynamicColor() && useFullDynamicColorAttr;
+ return shouldApplyDynamicColor()
+ && (useFullDynamicColorAttr
+ || PartnerConfigHelper.isSetupWizardFullDynamicColorEnabled(getContext()));
}
/**
- * Sets a logging observer for {@link FooterBarMixin}. The logging observer is used to log
- * impressions and clicks on the layout and footer bar buttons.
- *
- * @throws UnsupportedOperationException if the primary or secondary button has been set before
- * the logging observer is set
+ * Sets a logging observer for {@link FooterBarMixin}. The logging observer is used to log UI
+ * events (e.g. page impressions and button clicks) on the layout and footer bar buttons.
*/
public void setLoggingObserver(LoggingObserver loggingObserver) {
- getMixin(FooterBarMixin.class).setLoggingObserver(loggingObserver);
loggingObserver.log(new LayoutInflatedEvent(this));
+ getMixin(FooterBarMixin.class).setLoggingObserver(loggingObserver);
}
/**