[automerger] Fixed Invalid Pdu Issue am: 4b938358de am: fc2a2d071a am: ca00d5d151 am: 23de93c197 am: 909c1606d3 am: bfb0076f03

Change-Id: I5e5c940c7abb06294f507b3b48fad6672a6e7c38
diff --git a/src/java/com/android/internal/telephony/TelephonyTester.java b/src/java/com/android/internal/telephony/TelephonyTester.java
index ba59e6d..3de356f 100644
--- a/src/java/com/android/internal/telephony/TelephonyTester.java
+++ b/src/java/com/android/internal/telephony/TelephonyTester.java
@@ -22,6 +22,7 @@
 import android.content.IntentFilter;
 import android.content.SharedPreferences;
 import android.net.Uri;
+import android.os.BadParcelableException;
 import android.os.Build;
 import android.preference.PreferenceManager;
 import android.telephony.Rlog;
@@ -92,24 +93,29 @@
             @Override
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
-            if (DBG) log("sIntentReceiver.onReceive: action=" + action);
-            if (action.equals(mPhone.getActionDetached())) {
-                log("simulate detaching");
-                mPhone.getServiceStateTracker().mDetachedRegistrants.notifyRegistrants();
-            } else if (action.equals(mPhone.getActionAttached())) {
-                log("simulate attaching");
-                mPhone.getServiceStateTracker().mAttachedRegistrants.notifyRegistrants();
-            } else if (action.equals(ACTION_TEST_CONFERENCE_EVENT_PACKAGE)) {
-                log("inject simulated conference event package");
-                handleTestConferenceEventPackage(context, intent.getStringExtra(EXTRA_FILENAME));
-            } else if (action.equals(ACTION_TEST_DIALOG_EVENT_PACKAGE)) {
-                log("handle test dialog event package intent");
-                handleTestDialogEventPackageIntent(intent);
-            } else if (action.equals(ACTION_TEST_HANDOVER_FAIL)) {
-                log("handle handover fail test intent");
-                handleHandoverFailedIntent();
-            } else {
-                if (DBG) log("onReceive: unknown action=" + action);
+            try {
+                if (DBG) log("sIntentReceiver.onReceive: action=" + action);
+                if (action.equals(mPhone.getActionDetached())) {
+                    log("simulate detaching");
+                    mPhone.getServiceStateTracker().mDetachedRegistrants.notifyRegistrants();
+                } else if (action.equals(mPhone.getActionAttached())) {
+                    log("simulate attaching");
+                    mPhone.getServiceStateTracker().mAttachedRegistrants.notifyRegistrants();
+                } else if (action.equals(ACTION_TEST_CONFERENCE_EVENT_PACKAGE)) {
+                    log("inject simulated conference event package");
+                    handleTestConferenceEventPackage(context,
+                            intent.getStringExtra(EXTRA_FILENAME));
+                } else if (action.equals(ACTION_TEST_DIALOG_EVENT_PACKAGE)) {
+                    log("handle test dialog event package intent");
+                    handleTestDialogEventPackageIntent(intent);
+                } else if (action.equals(ACTION_TEST_HANDOVER_FAIL)) {
+                    log("handle handover fail test intent");
+                    handleHandoverFailedIntent();
+                } else {
+                    if (DBG) log("onReceive: unknown action=" + action);
+                }
+            } catch (BadParcelableException e) {
+                Rlog.w(LOG_TAG, e);
             }
         }
     };