@Test public void getCustomDataFromNullIntentExtras() { assertEquals(Collections.emptyMap(), PushIntentUtils.getCustomData(mock(Intent.class))); }
static Map<String, String> getCustomData(Intent pushIntent) { Map<String, String> customData = new HashMap<>(); Map<String, String> standardData = new HashMap<>(); Bundle intentExtras = pushIntent.getExtras(); if (intentExtras != null) { for (String key : intentExtras.keySet()) { String value = String.valueOf(intentExtras.get(key)); if (key.startsWith(EXTRA_GCM_PREFIX) || key.startsWith(EXTRA_GOOGLE_PREFIX) || EXTRA_STANDARD_KEYS.contains(key)) { standardData.put(key, value); } else { customData.put(key, value); } } } AppCenterLog.debug(LOG_TAG, "Push standard data: " + standardData); AppCenterLog.debug(LOG_TAG, "Push custom data: " + customData); return customData; }
PushIntentUtils { static Map<String, String> getCustomData(Intent pushIntent) { Map<String, String> customData = new HashMap<>(); Map<String, String> standardData = new HashMap<>(); Bundle intentExtras = pushIntent.getExtras(); if (intentExtras != null) { for (String key : intentExtras.keySet()) { String value = String.valueOf(intentExtras.get(key)); if (key.startsWith(EXTRA_GCM_PREFIX) || key.startsWith(EXTRA_GOOGLE_PREFIX) || EXTRA_STANDARD_KEYS.contains(key)) { standardData.put(key, value); } else { customData.put(key, value); } } } AppCenterLog.debug(LOG_TAG, "Push standard data: " + standardData); AppCenterLog.debug(LOG_TAG, "Push custom data: " + customData); return customData; } }
PushIntentUtils { static Map<String, String> getCustomData(Intent pushIntent) { Map<String, String> customData = new HashMap<>(); Map<String, String> standardData = new HashMap<>(); Bundle intentExtras = pushIntent.getExtras(); if (intentExtras != null) { for (String key : intentExtras.keySet()) { String value = String.valueOf(intentExtras.get(key)); if (key.startsWith(EXTRA_GCM_PREFIX) || key.startsWith(EXTRA_GOOGLE_PREFIX) || EXTRA_STANDARD_KEYS.contains(key)) { standardData.put(key, value); } else { customData.put(key, value); } } } AppCenterLog.debug(LOG_TAG, "Push standard data: " + standardData); AppCenterLog.debug(LOG_TAG, "Push custom data: " + customData); return customData; }  }
PushIntentUtils { static Map<String, String> getCustomData(Intent pushIntent) { Map<String, String> customData = new HashMap<>(); Map<String, String> standardData = new HashMap<>(); Bundle intentExtras = pushIntent.getExtras(); if (intentExtras != null) { for (String key : intentExtras.keySet()) { String value = String.valueOf(intentExtras.get(key)); if (key.startsWith(EXTRA_GCM_PREFIX) || key.startsWith(EXTRA_GOOGLE_PREFIX) || EXTRA_STANDARD_KEYS.contains(key)) { standardData.put(key, value); } else { customData.put(key, value); } } } AppCenterLog.debug(LOG_TAG, "Push standard data: " + standardData); AppCenterLog.debug(LOG_TAG, "Push custom data: " + customData); return customData; }   }
PushIntentUtils { static Map<String, String> getCustomData(Intent pushIntent) { Map<String, String> customData = new HashMap<>(); Map<String, String> standardData = new HashMap<>(); Bundle intentExtras = pushIntent.getExtras(); if (intentExtras != null) { for (String key : intentExtras.keySet()) { String value = String.valueOf(intentExtras.get(key)); if (key.startsWith(EXTRA_GCM_PREFIX) || key.startsWith(EXTRA_GOOGLE_PREFIX) || EXTRA_STANDARD_KEYS.contains(key)) { standardData.put(key, value); } else { customData.put(key, value); } } } AppCenterLog.debug(LOG_TAG, "Push standard data: " + standardData); AppCenterLog.debug(LOG_TAG, "Push custom data: " + customData); return customData; }    }