summaryrefslogtreecommitdiffstats
path: root/core/java/android/preference/CheckBoxPreference.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-07-22 18:52:56 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2011-07-22 18:58:28 -0700
commit5c3ea06a7a5558509545450ccc465d695bd1a2e6 (patch)
treeb23b3835fb132105b972c1e3f29e352029b9127a /core/java/android/preference/CheckBoxPreference.java
parentd24cd90486821535fb058531fac54aa5b9360693 (diff)
downloadframeworks_base-5c3ea06a7a5558509545450ccc465d695bd1a2e6.zip
frameworks_base-5c3ea06a7a5558509545450ccc465d695bd1a2e6.tar.gz
frameworks_base-5c3ea06a7a5558509545450ccc465d695bd1a2e6.tar.bz2
TwoStatePreference does not fire click events.
1. Event were send in onBindView but since we have fixed the bug of unattached views firing accessibility events and there is no guarantee that the view is attached in onBindView no events were sent. Now posting a runnable so on the next run the UI tread will send the event i.e. after the view is bound and attached. bug:5008841 Change-Id: I4ed914f7fb65d6896f0c55e7c46e6508d2b2f11f
Diffstat (limited to 'core/java/android/preference/CheckBoxPreference.java')
-rw-r--r--core/java/android/preference/CheckBoxPreference.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/preference/CheckBoxPreference.java b/core/java/android/preference/CheckBoxPreference.java
index 437e553..166b21b 100644
--- a/core/java/android/preference/CheckBoxPreference.java
+++ b/core/java/android/preference/CheckBoxPreference.java
@@ -61,8 +61,8 @@ public class CheckBoxPreference extends TwoStatePreference {
View checkboxView = view.findViewById(com.android.internal.R.id.checkbox);
if (checkboxView != null && checkboxView instanceof Checkable) {
((Checkable) checkboxView).setChecked(mChecked);
-
- sendAccessibilityEventForView(checkboxView);
+ // Post this so this view is bound and attached when firing the event.
+ postSendAccessibilityEventForView(checkboxView);
}
syncSummaryView(view);