Do not use hidden API ParcelableException
ParcelableException, when written into Parcel, just keeps the
excaption class name and its string representation. So we
pass the same across AIDL and compose the Exception class
on the other side, following how a ParcelableException
is read from Parcel.
Bug: 141315988
Test: make
Change-Id: I549f1316824857cdb6f4bbd47e6789eda0dcadd7
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ae45936..d149f7b 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1072,11 +1072,13 @@
try {
if (ar.exception != null) {
Log.e(LOG_TAG, "Exception retrieving CellInfo=" + ar.exception);
- cb.onError(TelephonyManager.CellInfoCallback.ERROR_MODEM_ERROR,
- new android.os.ParcelableException(ar.exception));
+ cb.onError(
+ TelephonyManager.CellInfoCallback.ERROR_MODEM_ERROR,
+ ar.exception.getClass().getName(),
+ ar.exception.toString());
} else if (ar.result == null) {
Log.w(LOG_TAG, "Timeout Waiting for CellInfo!");
- cb.onError(TelephonyManager.CellInfoCallback.ERROR_TIMEOUT, null);
+ cb.onError(TelephonyManager.CellInfoCallback.ERROR_TIMEOUT, null, null);
} else {
// use the result as returned
cb.onCellInfo((List<CellInfo>) ar.result);