bug:4128300 allow deletion of downloads in progress
Vasu Nori [Fri, 18 Mar 2011 18:03:57 +0000 (11:03 -0700)]
this functionality was broken when CAB was added to Downloads app

Change-Id: I00e7313650f872334d6a38dbaff7f97909e2c59c

ui/src/com/android/providers/downloads/ui/DownloadList.java

index 810e93e..09573c6 100644 (file)
@@ -132,6 +132,10 @@ public class DownloadList extends Activity {
     private class MyDataSetObserver extends DataSetObserver {
         @Override
         public void onChanged() {
+            // ignore change notification if there are selections
+            if (mSelectedIds.size() > 0) {
+                return;
+            }
             // may need to switch to or from the empty view
             chooseListToShow();
             ensureSomeGroupIsExpanded();