summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-01-19 15:31:51 -0800
committerGilles Debunne <debunne@google.com>2011-01-19 15:31:55 -0800
commit7c76d5f2cd2cc35e7c4f33264d5f281c96351377 (patch)
treeef8fc370959c29466cdbf5f1872cff6828d1b660 /common
parent396b1eb70452e27942550efaa06e10da84fc58db (diff)
downloadandroid_frameworks_ex-7c76d5f2cd2cc35e7c4f33264d5f281c96351377.tar.gz
android_frameworks_ex-7c76d5f2cd2cc35e7c4f33264d5f281c96351377.tar.bz2
android_frameworks_ex-7c76d5f2cd2cc35e7c4f33264d5f281c96351377.zip
Preventive fix in setNotificationsEnabled
This code setNotificationsEnabled(false); ... notifyDataChanged(); ... setNotificationsEnabled(false); should not notify that a change happended. Change-Id: Ia639530dcc2a34c24a7edbe2d2ba3530d22cacb9
Diffstat (limited to 'common')
-rw-r--r--common/java/com/android/common/widget/CompositeCursorAdapter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/java/com/android/common/widget/CompositeCursorAdapter.java b/common/java/com/android/common/widget/CompositeCursorAdapter.java
index d0c248f..d6064e1 100644
--- a/common/java/com/android/common/widget/CompositeCursorAdapter.java
+++ b/common/java/com/android/common/widget/CompositeCursorAdapter.java
@@ -513,8 +513,8 @@ public abstract class CompositeCursorAdapter extends BaseAdapter {
* disable notifications before making changes to several partitions at once.
*/
public void setNotificationsEnabled(boolean flag) {
- this.mNotificationsEnabled = flag;
- if (mNotificationNeeded) {
+ mNotificationsEnabled = flag;
+ if (flag && mNotificationNeeded) {
notifyDataSetChanged();
}
}