Allocate memory before reading from parcel

Allocate memory for mccmnc before reading from parcel
Bug: 113613093
Test: verified manual system test that request sent down correctly.

Change-Id: Ib436dc8dc62e7237143e099b1af23b26468b0392
This commit is contained in:
Sooraj Sasindran
2019-01-15 14:53:52 -08:00
parent 609ed3380f
commit 760a240d0e
2 changed files with 2 additions and 1 deletions

View File

@@ -110,6 +110,7 @@ public final class AvailableNetworkInfo implements Parcelable {
private AvailableNetworkInfo(Parcel in) {
mSubId = in.readInt();
mPriority = in.readInt();
mMccMncs = new ArrayList<>();
in.readStringList(mMccMncs);
}

View File

@@ -9796,7 +9796,7 @@ public class TelephonyManager {
boolean ret = false;
try {
IOns iOpportunisticNetworkService = getIOns();
if (iOpportunisticNetworkService != null) {
if (iOpportunisticNetworkService != null && availableNetworks != null) {
ret = iOpportunisticNetworkService.updateAvailableNetworks(availableNetworks,
pkgForDebug);
}