Bug 1508279 - Handle persistent notification actions. r=geckoview-reviewers,snorp
authorVlad Baicu <vlad.baicu@softvision.ro>
Thu, 10 Jan 2019 17:05:32 +0000
changeset 513304 9c8923903d734aabb5ff566b0da931cb7ee178aa
parent 513303 3a11ad73f5b8407be5526346167793873d878e97
child 513305 8ba84058447350628db3f23906674e681ff2c927
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp
bugs1508279
milestone66.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 1508279 - Handle persistent notification actions. r=geckoview-reviewers,snorp Handle persistent notifications click actions in NotificationReceiver. Differential Revision: https://phabricator.services.mozilla.com/D16062
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
--- a/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
@@ -90,21 +90,16 @@ public class NotificationReceiver extend
         if (persistentIntent != null) {
             // Go through GeckoService for persistent notifications.
             GeckoServicesCreatorService.enqueueWork(context, intent);
         }
 
         if (NotificationClient.CLICK_ACTION.equals(action)) {
             GeckoAppShell.onNotificationClick(name, cookie);
 
-            if (persistentIntent != null) {
-                // Don't launch GeckoApp if it's a background persistent notification.
-                return;
-            }
-
             final Intent appIntent = new Intent(GeckoApp.ACTION_ALERT_CALLBACK);
             appIntent.setComponent(new ComponentName(
                     data.getAuthority(), data.getPath().substring(1))); // exclude leading slash.
             appIntent.setData(data);
             appIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             context.startActivity(appIntent);
 
         } else if (NotificationClient.CLOSE_ACTION.equals(action)) {