Set initial state of themed icon repository
Flag: NA
Bug: 300257098
Test: manually verified
Change-Id: Idbba4a00d6960a267c759bc8b4ee120866ad2264
diff --git a/src/com/android/customization/model/themedicon/ThemedIconSectionController.java b/src/com/android/customization/model/themedicon/ThemedIconSectionController.java
index be7da04..1cc6d0a 100644
--- a/src/com/android/customization/model/themedicon/ThemedIconSectionController.java
+++ b/src/com/android/customization/model/themedicon/ThemedIconSectionController.java
@@ -80,7 +80,10 @@
mThemedIconSectionView.setViewListener(this::onViewActivated);
mThemedIconSectionView.getSwitch().setChecked(mSavedThemedIconEnabled);
mThemedIconOptionsProvider.fetchThemedIconEnabled(
- enabled -> mThemedIconSectionView.getSwitch().setChecked(enabled));
+ enabled -> {
+ mInteractor.setActivated(enabled);
+ mThemedIconSectionView.getSwitch().setChecked(enabled);
+ });
mInteractor.isActivatedAsLiveData().observeForever(mIsActivatedChangeObserver);
return mThemedIconSectionView;
}