merge in nyc-mr1-release history after reset to nyc-mr1-dev
diff --git a/msmcobalt/core/UlpProxyBase.h b/msmcobalt/core/UlpProxyBase.h
index 5d93e2b..7f896a6 100644
--- a/msmcobalt/core/UlpProxyBase.h
+++ b/msmcobalt/core/UlpProxyBase.h
@@ -112,6 +112,12 @@
        (void)aidingData;
        return false;
     }
+    inline virtual bool reportNmea(const char* nmea, int length)
+    {
+        (void)nmea;
+        (void)length;
+        return false;
+    }
 };
 
 } // namespace loc_core
diff --git a/msmcobalt/core/gps_extended_c.h b/msmcobalt/core/gps_extended_c.h
index 46be08b..8759905 100644
--- a/msmcobalt/core/gps_extended_c.h
+++ b/msmcobalt/core/gps_extended_c.h
@@ -78,6 +78,7 @@
 #define ULP_LOCATION_IS_FROM_EXT_DR   0X0080
 
 #define ULP_MIN_INTERVAL_INVALID 0xffffffff
+#define ULP_MAX_NMEA_STRING_SIZE 201
 
 /*Emergency SUPL*/
 #define GPS_NI_TYPE_EMERGENCY_SUPL    4
@@ -110,6 +111,14 @@
     unsigned char   map_index[GPS_LOCATION_MAP_INDEX_SIZE];
 } UlpLocation;
 
+typedef struct {
+    /** set to sizeof(UlpNmea) */
+    size_t          size;
+    char            nmea_str[ULP_MAX_NMEA_STRING_SIZE];
+    unsigned int    len;
+} UlpNmea;
+
+
 /** AGPS type */
 typedef int16_t AGpsExtType;
 #define AGPS_TYPE_INVALID       -1
diff --git a/msmcobalt/loc_api/Makefile.am b/msmcobalt/loc_api/Makefile.am
index a5f529b..4648097 100644
--- a/msmcobalt/loc_api/Makefile.am
+++ b/msmcobalt/loc_api/Makefile.am
@@ -6,7 +6,11 @@
      $(LOCPLA_CFLAGS) \
      -fno-short-enums \
      -D__func__=__PRETTY_FUNCTION__ \
-     -DTARGET_USES_QCOM_BSP
+     -DTARGET_USES_QCOM_BSP \
+     -std=c++11
+
+AM_CPPFLAGS = \
+     -std=c++11
 
 libloc_eng_so_la_h_sources = \
      loc_eng_dmn_conn_glue_msg.h \
diff --git a/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.cpp b/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.cpp
index 2d9eeac..73f5ed6 100644
--- a/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.cpp
+++ b/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -433,10 +433,17 @@
     }
 }
 
-inline
-void LocEngAdapter::reportNmea(const char* nmea, int length)
+void LocInternalAdapter::reportNmea(const char* nmea, int length)
 {
-    sendMsg(new LocEngReportNmea(mOwner, nmea, length));
+    sendMsg(new LocEngReportNmea(mLocEngAdapter->getOwner(), nmea, length));
+}
+
+inline void LocEngAdapter::reportNmea(const char* nmea, int length)
+{
+    if (!mUlp->reportNmea(nmea, length)) {
+        //Report it to HAL
+        mInternalAdapter->reportNmea(nmea, length);
+    }
 }
 
 inline
diff --git a/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.h b/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.h
index 416e4b7..4afea49 100644
--- a/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.h
+++ b/msmcobalt/loc_api/libloc_api_50001/LocEngAdapter.h
@@ -63,6 +63,7 @@
     virtual void stopFixInt();
     virtual void getZppInt();
     virtual void setUlpProxy(UlpProxyBase* ulp);
+    virtual void reportNmea(const char* nmea, int length);
 };
 
 typedef void (*loc_msg_sender)(void* loc_eng_data_p, void* msgp);
diff --git a/msmcobalt/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/msmcobalt/loc_api/libloc_api_50001/loc_eng_nmea.cpp
index ac057c1..6ab4a5f 100644
--- a/msmcobalt/loc_api/libloc_api_50001/loc_eng_nmea.cpp
+++ b/msmcobalt/loc_api/libloc_api_50001/loc_eng_nmea.cpp
@@ -156,6 +156,9 @@
     int64_t now = tv.tv_sec * 1000LL + tv.tv_usec / 1000;
     if (loc_eng_data_p->nmea_cb != NULL)
         loc_eng_data_p->nmea_cb(now, pNmea, length);
+
+    loc_eng_data_p->adapter->getUlpProxy()->reportNmea(pNmea, length);
+
     LOC_LOGD("NMEA <%s", pNmea);
 }