summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2015-08-10 17:01:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-10 17:01:59 +0000
commita237f4808bdca9f4fa8b475af3e9282e4faabb70 (patch)
treefd7bf825d1344c8906396caaada0a54bb624fdfc
parent228ce2369b4d0206c7ad00274972cb536a528f62 (diff)
parent53a49e5ed59dc95bb1a64310f334b19c22f6b5d9 (diff)
am 83e68ad7: am 5fb5180e: am ba55aab3: DO NOT MERGE Null check CallList mapping in callbacks
* commit '83e68ad7700ef2e68aac6ca417b3e99030781bee': DO NOT MERGE Null check CallList mapping in callbacks
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java32
1 files changed, 19 insertions, 13 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index ff1a50fcb..cf162c728 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -120,28 +120,34 @@ public class InCallPresenter implements CallList.Listener,
private final android.telecom.Call.Callback mCallCallback =
new android.telecom.Call.Callback() {
@Override
- public void onPostDialWait(android.telecom.Call call, String remainingPostDialSequence) {
- onPostDialCharWait(mCallList.getCallByTelecommCall(call).getId(),
- remainingPostDialSequence);
+ public void onPostDialWait(android.telecom.Call telecomCall,
+ String remainingPostDialSequence) {
+ final Call call = mCallList.getCallByTelecommCall(telecomCall);
+ if (call == null) {
+ Log.w(this, "Call not found in call list: " + telecomCall);
+ return;
+ }
+ onPostDialCharWait(call.getId(), remainingPostDialSequence);
}
@Override
- public void onDetailsChanged(android.telecom.Call call,
+ public void onDetailsChanged(android.telecom.Call telecomCall,
android.telecom.Call.Details details) {
+ final Call call = mCallList.getCallByTelecommCall(telecomCall);
+ if (call == null) {
+ Log.w(this, "Call not found in call list: " + telecomCall);
+ return;
+ }
for (InCallDetailsListener listener : mDetailsListeners) {
- listener.onDetailsChanged(mCallList.getCallByTelecommCall(call),
- details);
+ listener.onDetailsChanged(call, details);
}
}
@Override
- public void onConferenceableCallsChanged(
- android.telecom.Call call, List<android.telecom.Call> conferenceableCalls) {
- Log.i(this, "onConferenceableCallsChanged: " + call);
- for (InCallDetailsListener listener : mDetailsListeners) {
- listener.onDetailsChanged(mCallList.getCallByTelecommCall(call),
- call.getDetails());
- }
+ public void onConferenceableCallsChanged(android.telecom.Call telecomCall,
+ List<android.telecom.Call> conferenceableCalls) {
+ Log.i(this, "onConferenceableCallsChanged: " + telecomCall);
+ onDetailsChanged(telecomCall, telecomCall.getDetails());
}
};