Post updateExtras to handler to avoid potential concurrency issue.

There is a change that the call to updateExtras in setOriginalConnection
could be executing while an onExtrasChanged callback from another thread
comes in.  To be safe, changed code to post the updateExtras in
setOriginalConnection to the same handler that the call for onExtrasChanged
is posted to.

Admittedly I was not able to repro this issue, despite changing the code
to fire up 30 threads to attempt to concurrently update the extras.

Bug: 25613098
Change-Id: Ibc960252b72b832b3c55938d1f5a7cb123b55c85
(cherry picked from commit 1074e7a1cc2a0e6ebaefd90f0e2ff203f8831514)
diff --git a/src/com/android/services/telephony/ b/src/com/android/services/telephony/
index 5995e53..d0da59d 100644
--- a/src/com/android/services/telephony/
+++ b/src/com/android/services/telephony/
@@ -623,7 +623,11 @@
-        updateExtras(mOriginalConnection.getConnectionExtras());
+        // Post update of extras to the handler; extras are updated via the handler to ensure thread
+        // safety.
+        mHandler.obtainMessage(MSG_CONNECTION_EXTRAS_CHANGED,
+                mOriginalConnection.getConnectionExtras()).sendToTarget();
         if (isImsConnection()) {
             mWasImsConnection = true;