Merge "Handle exceptions other than CommandException" into lmp-mr1-dev
diff --git a/src/com/android/phone/CallWaitingCheckBoxPreference.java b/src/com/android/phone/CallWaitingCheckBoxPreference.java
index ce2a420..bda8b3b 100644
--- a/src/com/android/phone/CallWaitingCheckBoxPreference.java
+++ b/src/com/android/phone/CallWaitingCheckBoxPreference.java
@@ -87,15 +87,20 @@
}
}
- if (ar.exception != null) {
+ if (ar.exception instanceof CommandException) {
if (DBG) {
- Log.d(LOG_TAG, "handleGetCallWaitingResponse: ar.exception=" + ar.exception);
+ Log.d(LOG_TAG, "handleGetCallWaitingResponse: CommandException=" +
+ ar.exception);
}
if (mTcpListener != null) {
mTcpListener.onException(CallWaitingCheckBoxPreference.this,
(CommandException)ar.exception);
}
- } else if (ar.userObj instanceof Throwable) {
+ } else if (ar.userObj instanceof Throwable || ar.exception != null) {
+ // Still an error case but just not a CommandException.
+ if (DBG) {
+ Log.d(LOG_TAG, "handleGetCallWaitingResponse: Exception" + ar.exception);
+ }
if (mTcpListener != null) {
mTcpListener.onError(CallWaitingCheckBoxPreference.this, RESPONSE_ERROR);
}