From fcd55caafdb83b664d1069a6ca96b40fd6cdf452 Mon Sep 17 00:00:00 2001 From: sqian Date: Thu, 22 Aug 2019 09:20:42 -0700 Subject: [PATCH] Update the currentCalls before VTS notification. It's reasonable to update the global variable "currentCalls" before notifying the reader thread. Otherwise this can cause some issues such as null pointer dereference in other modem. Bug: 139264227 Test: Don't have devices that uses the corresponding modem that reports this issues. This is verified according to a partner CL: https://partner-android-review.googlesource.com/c/platform/hardware/interfaces/+/1422356 Change-Id: Iee9e18149397c39b7c84ec1dc570b9bac7142eb6 --- radio/1.4/vts/functional/radio_response.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/1.4/vts/functional/radio_response.cpp b/radio/1.4/vts/functional/radio_response.cpp index a849926cf0..d0aae47554 100644 --- a/radio/1.4/vts/functional/radio_response.cpp +++ b/radio/1.4/vts/functional/radio_response.cpp @@ -733,8 +733,8 @@ Return RadioResponse_v1_4::getCurrentCallsResponse_1_2( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls) { rspInfo = info; - parent_v1_4.notify(info.serial); currentCalls = calls; + parent_v1_4.notify(info.serial); return Void(); }