diff options
author | Gilles Debunne <debunne@google.com> | 2011-01-19 15:31:51 -0800 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2011-01-19 15:31:55 -0800 |
commit | 7c76d5f2cd2cc35e7c4f33264d5f281c96351377 (patch) | |
tree | ef8fc370959c29466cdbf5f1872cff6828d1b660 /common | |
parent | 396b1eb70452e27942550efaa06e10da84fc58db (diff) | |
download | android_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.java | 4 |
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(); } } |