Merge "Fixed bug in upgrading GpsMeasurement" into nyc-dev

am: e1b5171

* commit 'e1b51715bdd1d59913ef4cb83071ef8eaac968de':
  Fixed bug in upgrading GpsMeasurement

Change-Id: I89d094509612073a7e7e046db48f896a653d42a9
This commit is contained in:
Lifu Tang
2016-04-20 22:30:52 +00:00
committed by android-build-merger

View File

@@ -1194,7 +1194,7 @@ static jobject translate_gps_measurement(JNIEnv* env,
JavaObject object(env, "android/location/GnssMeasurement");
GpsMeasurementFlags flags = measurement->flags;
SET(Svid, static_cast<int32_t>(measurement->prn));
if (measurement->prn >= 1 || measurement->prn <= 32) {
if (measurement->prn >= 1 && measurement->prn <= 32) {
SET(ConstellationType, static_cast<int32_t>(GNSS_CONSTELLATION_GPS));
} else {
ALOGD("Unknown constellation type with Svid = %d.", measurement->prn);