summaryrefslogtreecommitdiff
path: root/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-12 23:17:55 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-12 23:17:55 +0000
commitcd02b968a9759276f56ecc9ffe7bf2262c903901 (patch)
treef86037efa286448f802ffcc1fce929e01f5bbe02 /src/com/android/customization/picker/themedicon/ThemedIconSectionView.java
parent6247144da621f3bd496b236c59ed01acd7cb8245 (diff)
parent0a19d853fa8042e184788c2da2ed7d3b889b165a (diff)
downloadThemePicker-sdk-release.tar.gz
Snap for 11566117 from 0a19d853fa8042e184788c2da2ed7d3b889b165a to sdk-releaseplatform-tools-35.0.1sdk-release
Change-Id: I61991fb5b06bef4dccc5dc4004836bbe7af80823
Diffstat (limited to 'src/com/android/customization/picker/themedicon/ThemedIconSectionView.java')
-rw-r--r--src/com/android/customization/picker/themedicon/ThemedIconSectionView.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java b/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java
index 3e03a41c..f83da8c1 100644
--- a/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java
+++ b/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java
@@ -40,18 +40,16 @@ public class ThemedIconSectionView extends SectionView {
protected void onFinishInflate() {
super.onFinishInflate();
mSwitchView = findViewById(R.id.themed_icon_toggle);
- setOnClickListener(v -> mSwitchView.toggle());
- mSwitchView.setOnCheckedChangeListener((buttonView, isChecked) -> viewActivated(isChecked));
+ setOnClickListener(v -> {
+ mSwitchView.toggle();
+ if (mSectionViewListener != null) {
+ mSectionViewListener.onViewActivated(getContext(), mSwitchView.isChecked());
+ }
+ });
}
/** Gets the switch view. */
public Switch getSwitch() {
return mSwitchView;
}
-
- private void viewActivated(boolean isChecked) {
- if (mSectionViewListener != null) {
- mSectionViewListener.onViewActivated(getContext(), isChecked);
- }
- }
}