Bug 1030740 - Add return statements inadvertently omitted from Bug 1025937. r=mcomella, a=sylvestre
authorRichard Newman <rnewman@mozilla.com>
Thu, 26 Jun 2014 09:48:48 -0700
changeset 207404 731a5e8831e6b7b9d325975fbeee35fd4497a5ca
parent 207403 f2be42467a16dc3c6a1eff6ce3ab0283d5cb4768
child 207405 577c1dd3fc024883fafe3e80ea5a4f8bf7ef847e
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella, sylvestre
bugs1030740, 1025937
milestone32.0a2
Bug 1030740 - Add return statements inadvertently omitted from Bug 1025937. r=mcomella, a=sylvestre
mobile/android/base/background/announcements/AnnouncementsBroadcastService.java
mobile/android/base/background/announcements/AnnouncementsService.java
mobile/android/base/background/healthreport/HealthReportBroadcastService.java
mobile/android/base/background/healthreport/prune/HealthReportPruneService.java
mobile/android/base/background/healthreport/upload/HealthReportUploadService.java
mobile/android/base/fxa/receivers/FxAccountDeletedService.java
mobile/android/base/sync/receivers/SyncAccountDeletedService.java
--- a/mobile/android/base/background/announcements/AnnouncementsBroadcastService.java
+++ b/mobile/android/base/background/announcements/AnnouncementsBroadcastService.java
@@ -117,17 +117,18 @@ public class AnnouncementsBroadcastServi
   }
 
   @Override
   protected void onHandleIntent(Intent intent) {
     Logger.setThreadLogTag(AnnouncementsConstants.GLOBAL_LOG_TAG);
 
     // Intent can be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     final String action = intent.getAction();
     Logger.debug(LOG_TAG, "Broadcast onReceive. Intent is " + action);
 
     if (AnnouncementsConstants.ACTION_ANNOUNCEMENTS_PREF.equals(action)) {
       handlePrefIntent(intent);
       return;
--- a/mobile/android/base/background/announcements/AnnouncementsService.java
+++ b/mobile/android/base/background/announcements/AnnouncementsService.java
@@ -115,17 +115,18 @@ public class AnnouncementsService extend
    * by the AlarmManager.
    */
   @Override
   public void onHandleIntent(Intent intent) {
     Logger.setThreadLogTag(AnnouncementsConstants.GLOBAL_LOG_TAG);
 
     // Intent can be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     Logger.debug(LOG_TAG, "Running AnnouncementsService.");
 
     if (AnnouncementsConstants.DISABLED) {
       Logger.debug(LOG_TAG, "Announcements disabled. Returning from AnnouncementsService.");
       return;
     }
--- a/mobile/android/base/background/healthreport/HealthReportBroadcastService.java
+++ b/mobile/android/base/background/healthreport/HealthReportBroadcastService.java
@@ -97,17 +97,18 @@ public class HealthReportBroadcastServic
   }
 
   @Override
   protected void onHandleIntent(Intent intent) {
     Logger.setThreadLogTag(HealthReportConstants.GLOBAL_LOG_TAG);
 
     // Intent can be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     // The same intent can be handled by multiple methods so do not short-circuit evaluate.
     boolean handled = attemptHandleIntentForUpload(intent);
     handled = attemptHandleIntentForPrune(intent) ? true : handled;
 
     if (!handled) {
       Logger.warn(LOG_TAG, "Unhandled intent with action " + intent.getAction() + ".");
--- a/mobile/android/base/background/healthreport/prune/HealthReportPruneService.java
+++ b/mobile/android/base/background/healthreport/prune/HealthReportPruneService.java
@@ -37,17 +37,18 @@ public class HealthReportPruneService ex
   }
 
   @Override
   public void onHandleIntent(Intent intent) {
     Logger.setThreadLogTag(HealthReportConstants.GLOBAL_LOG_TAG);
 
     // Intent can be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     Logger.debug(LOG_TAG, "Handling prune intent.");
 
     if (!isIntentValid(intent)) {
       Logger.warn(LOG_TAG, "Intent not valid - returning.");
       return;
     }
--- a/mobile/android/base/background/healthreport/upload/HealthReportUploadService.java
+++ b/mobile/android/base/background/healthreport/upload/HealthReportUploadService.java
@@ -40,17 +40,18 @@ public class HealthReportUploadService e
   }
 
   @Override
   public void onHandleIntent(Intent intent) {
     Logger.setThreadLogTag(HealthReportConstants.GLOBAL_LOG_TAG);
 
     // Intent can be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     if (HealthReportConstants.UPLOAD_FEATURE_DISABLED) {
       Logger.debug(LOG_TAG, "Health report upload feature is compile-time disabled; not handling upload intent.");
       return;
     }
 
     Logger.debug(LOG_TAG, "Health report upload feature is compile-time enabled; handling upload intent.");
--- a/mobile/android/base/fxa/receivers/FxAccountDeletedService.java
+++ b/mobile/android/base/fxa/receivers/FxAccountDeletedService.java
@@ -26,17 +26,18 @@ public class FxAccountDeletedService ext
   public FxAccountDeletedService() {
     super(LOG_TAG);
   }
 
   @Override
   protected void onHandleIntent(final Intent intent) {
     // Intent can, in theory, be null. Bug 1025937.
     if (intent == null) {
-        Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     final Context context = this;
 
     long intentVersion = intent.getLongExtra(
         FxAccountConstants.ACCOUNT_DELETED_INTENT_VERSION_KEY, 0);
     long expectedVersion = FxAccountConstants.ACCOUNT_DELETED_INTENT_VERSION;
     if (intentVersion != expectedVersion) {
--- a/mobile/android/base/sync/receivers/SyncAccountDeletedService.java
+++ b/mobile/android/base/sync/receivers/SyncAccountDeletedService.java
@@ -30,16 +30,17 @@ public class SyncAccountDeletedService e
     super(LOG_TAG);
   }
 
   @Override
   protected void onHandleIntent(Intent intent) {
     // Intent can, in theory, be null. Bug 1025937.
     if (intent == null) {
       Logger.debug(LOG_TAG, "Short-circuiting on null intent.");
+      return;
     }
 
     final Context context = this;
 
     long intentVersion = intent.getLongExtra(Constants.JSON_KEY_VERSION, 0);
     long expectedVersion = SyncConstants.SYNC_ACCOUNT_DELETED_INTENT_VERSION;
     if (intentVersion != expectedVersion) {
       Logger.warn(LOG_TAG, "Intent malformed: version " + intentVersion + " given but version " + expectedVersion + "expected. " +