Post updateExtras to handler to avoid potential concurrency issue. am: 59cacee0ac
am: cabb01cbd9
* commit 'cabb01cbd9fe7ddf4a2a11160db936f23201afaa':
Post updateExtras to handler to avoid potential concurrency issue.
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 5995e53..d0da59d 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -623,7 +623,11 @@
setWifi(mOriginalConnection.isWifi());
setVideoProvider(mOriginalConnection.getVideoProvider());
setAudioQuality(mOriginalConnection.getAudioQuality());
- 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;