Bug 601837 - Hide progress notification when reached 100% r=blassey a=mfinkle
authorAlex Pakhotin <alexp@mozilla.com>
Mon, 04 Oct 2010 20:05:43 -0700
changeset 58188 ee357cb142cb47545456dc889c4c56465ba34011
parent 58187 a0c57346cb22fb2f1b78a0c5f8fdfb98ca498f03
child 58189 9ff362a5b8db9dcfe81efa677e8325cb6ec9e1f7
push id17192
push userblassey@mozilla.com
push dateWed, 24 Nov 2010 20:33:36 +0000
treeherdermozilla-central@ee357cb142cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, mfinkle
bugs601837
milestone2.0b8pre
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 601837 - Hide progress notification when reached 100% r=blassey a=mfinkle
embedding/android/GeckoAppShell.java
--- a/embedding/android/GeckoAppShell.java
+++ b/embedding/android/GeckoAppShell.java
@@ -553,16 +553,22 @@ class GeckoAppShell
         Log.i("GeckoAppJava", "GeckoAppShell.alertsProgressListener_OnProgress\n" +
             "- name = '" + aAlertName +"', " +
             "progress = " + aProgress +" / " + aProgressMax + ", text = '" + aAlertText + "'");
 
         int notificationID = aAlertName.hashCode();
         AlertNotification notification = mAlertNotifications.get(notificationID);
         if (notification != null)
             notification.updateProgress(aAlertText, aProgress, aProgressMax);
+
+        if (aProgress == aProgressMax) {
+            // Hide the notification at 100%
+            removeObserver(aAlertName);
+            removeNotification(notificationID);
+        }
     }
 
     public static void alertsProgressListener_OnCancel(String aAlertName) {
         Log.i("GeckoAppJava", "GeckoAppShell.alertsProgressListener_OnCancel('" + aAlertName + "'");
 
         removeObserver(aAlertName);
 
         int notificationID = aAlertName.hashCode();