Merge "Protect against ClassCastException in PstnIncomingCallNotifier" into lmp-dev
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index 654150c..f4c8a22 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -197,6 +197,10 @@
private void handleNewUnknownConnection(AsyncResult asyncResult) {
Log.i(this, "handleNewUnknownConnection");
+ if (!(asyncResult.result instanceof Connection)) {
+ Log.w(this, "handleNewUnknownConnection called with non-Connection object");
+ return;
+ }
Connection connection = (Connection) asyncResult.result;
if (connection != null) {
Call call = connection.getCall();