From 1778b030f7e372d6211ea2f374e89289bc8e8ac3 Mon Sep 17 00:00:00 2001 From: Lifu Tang Date: Wed, 16 Mar 2016 18:28:33 -0700 Subject: [PATCH] Fixed bugs in serialization and object cloning Bug: 27621461 Change-Id: I52cbf874d506cc5f6dee73d1a14b5dc07f87bd39 --- .../java/android/location/GnssNavigationMessage.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/location/java/android/location/GnssNavigationMessage.java b/location/java/android/location/GnssNavigationMessage.java index ac255c8e823fe..e5c0f276b142d 100644 --- a/location/java/android/location/GnssNavigationMessage.java +++ b/location/java/android/location/GnssNavigationMessage.java @@ -286,18 +286,11 @@ public final class GnssNavigationMessage implements Parcelable { navigationMessage.setSvid(parcel.readInt()); navigationMessage.setMessageId(parcel.readInt()); navigationMessage.setSubmessageId(parcel.readInt()); - int dataLength = parcel.readInt(); byte[] data = new byte[dataLength]; parcel.readByteArray(data); navigationMessage.setData(data); - - if (parcel.dataAvail() >= Integer.SIZE) { - int status = parcel.readInt(); - navigationMessage.setStatus(status); - } else { - navigationMessage.setStatus(STATUS_UNKNOWN); - } + navigationMessage.setStatus(parcel.readInt()); return navigationMessage; }