From adcb75d38bd6b1906c6c77d8e627bd9f48fb41ec Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 12 Feb 2019 16:13:34 -0800 Subject: [PATCH] Debug Event for Malformed PLMN ID in CellIdentity Add a debug event to catch the case where the modem reports a PLMN-ID that is either malformed or incomplete. Bug: 124332651 Test: compilation Change-Id: Iffea47349ff999aade2aa26e30f00e5007ba7b4e --- telephony/java/android/telephony/CellIdentity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/telephony/java/android/telephony/CellIdentity.java b/telephony/java/android/telephony/CellIdentity.java index 6958d22bf5cc5..7655834445b2d 100644 --- a/telephony/java/android/telephony/CellIdentity.java +++ b/telephony/java/android/telephony/CellIdentity.java @@ -23,6 +23,7 @@ import android.os.Parcelable; import android.text.TextUtils; import java.util.Objects; +import java.util.UUID; /** * CellIdentity represents the identity of a unique cell. This is the base class for @@ -83,6 +84,13 @@ public abstract class CellIdentity implements Parcelable { mMncStr = null; log("invalid MNC format: " + mnc); } + + if ((mMccStr != null && mMncStr == null) || (mMccStr == null && mMncStr != null)) { + DebugEventReporter.sendEvent( + UUID.fromString("a3ab0b9d-f2aa-4baf-911d-7096c0d4645a"), + "CellIdentity Missing Half of PLMN ID"); + } + mAlphaLong = alphal; mAlphaShort = alphas; }