Bug 743633 - Dismissed doorhanger popup reappears when doorhanger notifications are added to background tabs. r=mfinkle
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Wed, 11 Apr 2012 15:10:49 -0700
changeset 94788 280a293f69613257ef705ed091428d154ce58cb3
parent 94787 ec39d423e265ecb83a73ea56cf6860ed840036a2
child 94789 af7263971ad4fcb3a0d1b5e64f6e80ba788b71be
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs743633
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 743633 - Dismissed doorhanger popup reappears when doorhanger notifications are added to background tabs. r=mfinkle
mobile/android/base/DoorHangerPopup.java
--- a/mobile/android/base/DoorHangerPopup.java
+++ b/mobile/android/base/DoorHangerPopup.java
@@ -107,17 +107,19 @@ public class DoorHangerPopup extends Pop
             }
          }
         dh.setOptions(options);
 
         dh.setTab(tab);
         tab.addDoorHanger(value, dh);
         mContent.addView(dh);
 
-        updatePopup();
+        // Only update the popup if we're adding a notifcation to the selected tab
+        if (tab.equals(Tabs.getInstance().getSelectedTab()))
+            updatePopup();
     }
 
     // Updates popup contents to show doorhangers for the selected tab
     public void updatePopup() {
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab == null) {
             hidePopup();
             return;