diff --git a/telecomm/java/android/telecom/CallDiagnosticService.java b/telecomm/java/android/telecom/CallDiagnosticService.java
index 011dc17..336a8ea 100644
--- a/telecomm/java/android/telecom/CallDiagnosticService.java
+++ b/telecomm/java/android/telecom/CallDiagnosticService.java
@@ -294,6 +294,10 @@
         CallDiagnostics callDiagnostics;
         synchronized (mLock) {
             callDiagnostics = mDiagnosticCallByTelecomCallId.get(telecomCallId);
+            if (callDiagnostics == null) {
+                // Possible to get a call update after a call is removed.
+                return;
+            }
             mCallByTelecomCallId.put(telecomCallId, newCallDetails);
         }
         getExecutor().execute(() -> callDiagnostics.handleCallUpdated(newCallDetails));
@@ -306,12 +310,12 @@
     private void handleCallRemoved(@NonNull String telecomCallId) {
         Log.i(this, "handleCallRemoved: callId=%s - removed", telecomCallId);
 
-        if (mCallByTelecomCallId.containsKey(telecomCallId)) {
-            mCallByTelecomCallId.remove(telecomCallId);
-        }
-
         CallDiagnostics callDiagnostics;
         synchronized (mLock) {
+            if (mCallByTelecomCallId.containsKey(telecomCallId)) {
+                mCallByTelecomCallId.remove(telecomCallId);
+            }
+
             if (mDiagnosticCallByTelecomCallId.containsKey(telecomCallId)) {
                 callDiagnostics = mDiagnosticCallByTelecomCallId.remove(telecomCallId);
             } else {
@@ -353,7 +357,10 @@
     private void handleCallDisconnected(@NonNull String callId,
             @NonNull DisconnectCause disconnectCause) {
         Log.i(this, "handleCallDisconnected: call=%s; cause=%s", callId, disconnectCause);
-        CallDiagnostics callDiagnostics = mDiagnosticCallByTelecomCallId.get(callId);
+        CallDiagnostics callDiagnostics;
+        synchronized (mLock) {
+            callDiagnostics = mDiagnosticCallByTelecomCallId.get(callId);
+        }
         CharSequence message;
         if (disconnectCause.getImsReasonInfo() != null) {
             message = callDiagnostics.onCallDisconnected(disconnectCause.getImsReasonInfo());
@@ -391,7 +398,9 @@
             @NonNull CallQuality callQuality) {
         Log.i(this, "handleCallQualityChanged; call=%s, cq=%s", callId, callQuality);
         CallDiagnostics callDiagnostics;
-        callDiagnostics = mDiagnosticCallByTelecomCallId.get(callId);
+        synchronized(mLock) {
+            callDiagnostics = mDiagnosticCallByTelecomCallId.get(callId);
+        }
         if (callDiagnostics != null) {
             callDiagnostics.onCallQualityReceived(callQuality);
         }
