Source:
<code>protected List<FilterableNotification> filterLocationCampaigns(List<FilterableNotification> filterableNotifications, long now) { List<CampaignMatch> campaignMatches = new ArrayList<>(); Map<String, LocationCampaign> locationCampaigns = SwrveSDKBase.getInstance().getLocationCampaigns(); for (FilterableNotification filterableNotification : filterableNotifications) { LocationPayload locationPayload = LocationPayload.fromJSON(filterableNotification.getData()); if (locationPayload == null || SwrveHelper.isNullOrEmpty(locationPayload.getCampaignId())) { Log.e(LOG_TAG, "LocationPayload is invalid. Payload:" + filterableNotification.getData()); continue; } LocationCampaign locationCampaign = locationCampaigns.get(locationPayload.getCampaignId()); if (locationCampaign == null || locationCampaign.getMessage() == null) { Log.e(LOG_TAG, "LocationCampaign not downloaded, or not found, or invalid. Payload:" + filterableNotification.getData()); continue; } <START> if (locationCampaign.getStart() < now && (locationCampaign.getEnd() > now || locationCampaign.getEnd() == 0)) { <END> campaignMatches.add(new CampaignMatch(filterableNotification, locationCampaign)); } else { Log.i(LOG_TAG, "LocationCampaign is out of date:" + filterableNotification.getData()); } } List<FilterableNotification> notificationsToSend = new ArrayList<>(); if (campaignMatches.size() == 0) { Log.i(LOG_TAG, "No LocationCampaigns were matched "); } else { CampaignMatch match = getByMostRecentlyStarted(campaignMatches); FilterableNotification notificationToSend = match.filterableNotification; LocationMessage message = match.locationCampaign.getMessage(); notificationToSend.setData(String.valueOf(message.getId())); notificationToSend.setMessage(message.getBody()); notificationsToSend.add(notificationToSend); sendLocationImpression(message.getId()); } return notificationsToSend; }</code><technical_language><= >= maybe</technical_language>

Target:
protected List<FilterableNotification> filterLocationCampaigns(List<FilterableNotification> filterableNotifications, long now) { List<CampaignMatch> campaignMatches = new ArrayList<>(); Map<String, LocationCampaign> locationCampaigns = SwrveSDKBase.getInstance().getLocationCampaigns(); for (FilterableNotification filterableNotification : filterableNotifications) { LocationPayload locationPayload = LocationPayload.fromJSON(filterableNotification.getData()); if (locationPayload == null || SwrveHelper.isNullOrEmpty(locationPayload.getCampaignId())) { Log.e(LOG_TAG, "LocationPayload is invalid. Payload:" + filterableNotification.getData()); continue; } LocationCampaign locationCampaign = locationCampaigns.get(locationPayload.getCampaignId()); if (locationCampaign == null || locationCampaign.getMessage() == null) { Log.e(LOG_TAG, "LocationCampaign not downloaded, or not found, or invalid. Payload:" + filterableNotification.getData()); continue; } if (locationCampaign.getStart() <= now && (locationCampaign.getEnd() >= now || locationCampaign.getEnd() == 0)) { campaignMatches.add(new CampaignMatch(filterableNotification, locationCampaign)); } else { Log.i(LOG_TAG, "LocationCampaign is out of date:" + filterableNotification.getData()); } } List<FilterableNotification> notificationsToSend = new ArrayList<>(); if (campaignMatches.size() == 0) { Log.i(LOG_TAG, "No LocationCampaigns were matched "); } else { CampaignMatch match = getByMostRecentlyStarted(campaignMatches); FilterableNotification notificationToSend = match.filterableNotification; LocationMessage message = match.locationCampaign.getMessage(); notificationToSend.setData(String.valueOf(message.getId())); notificationToSend.setMessage(message.getBody()); notificationsToSend.add(notificationToSend); sendLocationImpression(message.getId()); } return notificationsToSend; }